The Better-Config-File Common Gateway Interface (CGI) Perl script uses a number of examples from the Perl Cookbook to provide an example to myself of better configuration file handling.
I refer to the Perl Cookbook and Programming Perl (the Camel Book) often when trying to write better perl code.
The Better-Config-File Common Gateway Interface (CGI) Perl script was created to test the configuration file populating a hash method of using a configuration file and was implemented as a loadConfigHash() subroutine in numerous programs in 2009. In 2009 I was still using Revision Control System (RCS) and my default for CGI Perl scripts included a LAM::displaySource() call that added the feature to display source RCS differences and more. In 2022 I have almost completely converted to git although in some cases the old RCS archives are within the git repository. I have modified the LAM::displaySource() subroutine to accept a parameter and I modified this program to link to the source on GitHub. I made some fixes including recovering the final version of the original configuration test file which is hard-coded into this test program and the default for the private version.
Some of the programs I first used this in have become obsolete including IPStatus.pl and runFTPjob.pl but it is still used in many including by most popular backup program BkRsync.pl which is used along with a number of configuration files by symbolic links to the program.
Log
Published to: http://z.lam1.us/About/Program/Better-Config-File
- Sunday, July 17, 2022 - Recovered my first "Better Configuration File" test configuration file.
- Saturday, January 24, 2009 @ 12:38:58 AM (Alaska Time) - I now have a Private version of the program That displays a form allowing the user to specify the configuration file to parse. The file can also be submitted as a GET or POST parameter and allows me to code URLs in Private documentation that will display the values of a particular configuration file.
- Friday, January 23, 2009 @ 3:30:13 AM (Alaska Time) - I keep testing, programming and documenting and am up to version 1.7 of this program. In this version I added an alternate means of ending the Basic Better Configuration File Parameter processing. This will allow me to extend it with a very special purpose. I might be ready to write runFTPjob. This version processes versions 1.4 and 1.5 of the configuration file with the same resulting parameter list by ignoring version 1.5 of the file after the new terminator.
- Thursday, January 22, 2009 @ 10:23:15 PM (Alaska Time) - I have decided to make this brand new program the second public program documented in the /About/Program area of my site.
- I included links to the program source, file revision history, and pending source file changes that are automatically available when I use one of my current Common Gateway Interface (CGI) Perl script templates. These links have been available for my public programs for some time but I have not gotten around to documentation in a more human readable form. I do spend a fair amount of time maiking my source readable to me and including comments to help in that effort. I also included a link to the LAM perl module which is the main custom perl module I use in perl web page programs for my site.