tunafish has asked for the wisdom of the Perl Monks concerning the following question:
So I was wondering what the best practice is for storing constants in an external file. I have scripts that I wrote before I heard of "use strict". The scripts share a configuration file, conf.pl, that defines things like database name, database user and password, paths to various folders, etc. Currently, the format is:
$constant_name = "constant_value";I know this is wrong. What's the best way to do this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best practice for configuration variables stored in external file
by tobyink (Canon) on Sep 06, 2013 at 07:01 UTC | |
|
Re: Best practice for configuration variables stored in external file
by McA (Priest) on Sep 06, 2013 at 07:20 UTC | |
by afoken (Chancellor) on Sep 06, 2013 at 19:33 UTC | |
by tunafish (Beadle) on Sep 08, 2013 at 01:51 UTC |