in reply to Best practice for configuration variables stored in external file
Hi,
I think your solution is not completely wrong. Put your constants into one or more perl modules an use (not import) them where you need it without polluting the namespace. Why shall a textfile which gets parsed by a module be better than a textfile (.pm) which gets parsed by perl itself?
The question is: Do you need the ability to reconfigure at runtime (Constants are constant, aren't they)? Are the config constants bundled in a way, so that these constants belong to a component of your program. But this is the same problem as cutting your program into meaningful pieces (modules).
Opinions from the illuminated monks appreciated.
Best regards
McA
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Best practice for configuration variables stored in external file
by afoken (Chancellor) on Sep 06, 2013 at 19:33 UTC | |
by tunafish (Beadle) on Sep 08, 2013 at 01:51 UTC |
In Section
Seekers of Perl Wisdom