in reply to Managing Configuration Differences & Perl

Another suggestion -- create one global config file and several separate config files, one for each environment, all of which can be copied to all of the hosts.

Then, on each machine, create an environment variable or a one-line text file named something like local.config that contains the name of the environment.

When the script starts up, pull in the global config, then read the local.config and pull in whatever config file it names. Put default values in the global config file and let the local configs override them.

That way, your various config files can all be in the same CVS archive or the same distribution tarball, and the only the changes is the name of the config file you want loaded.

  • Comment on Re: Managing Configuration Differences & Perl