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.


In reply to Re: Managing Configuration Differences & Perl by simonm
in thread Managing Configuration Differences & Perl by eak

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.