I&#39;m not entirely sure if its best practice, but my feeling is that I would prefer a config file because its a more obvious artifact that can be deployed with the application.  As for format, YAML of course.  And here&#39;s a module especial for that.<br>

<br><a href="http://search.cpan.org/~moconnor/YAML-AppConfig-0.16/lib/YAML/AppConfig.pm">http://search.cpan.org/~moconnor/YAML-AppConfig-0.16/lib/YAML/AppConfig.pm</a><br><br>Skylos<br><br><br><div class="gmail_quote">On Thu, Apr 8, 2010 at 10:45 AM, Michael R. Wolf <span dir="ltr">&lt;<a href="mailto:MichaelRWolf@att.net">MichaelRWolf@att.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">As some DBI-based code is being ported to other machines, I&#39;m having to pass command-line parameters to too many administrative and test programs.  I&#39;d like to change this *once* external to *all* programs and have it apply to them all.  This will have the added benefit of articulating a cleaner differentiation between environments (development, test, production).<br>


<br>
What&#39;s more popular to do this?<br>
 - environment variables<br>
 - config file<br>
<br>
In code, and in *theory*, it&#39;s a trivial difference...<br>
<br>
    $db_user = $ENV{db_user} || &#39;root&#39;;<br>
        versus<br>
    $db_user = $some_config_ref-&gt;get_attribute(&#39;db_user&#39;) || &#39;root&#39;;<br>
<br>
I&#39;m more interested in how this works in *practice*.  That is, when fielded, which seems to be groked by more end users?  And if the answer is &#39;config&#39;, which of the 2 score and twenty config modules seems to be groked by more end users?<br>


<br>
Thanks,<br>
Michael<br>
<br>
--<br></blockquote></div><br clear="all"><br>-- <br>&quot;If only I could get rid of hunger by rubbing my belly&quot; - Diogenes<br>