XP is just a number | |
PerlMonks |
What are all the means of application configuration?by princepawn (Parson) |
on Oct 02, 2000 at 21:45 UTC ( [id://34934]=perlquestion: print w/replies, xml ) | Need Help?? |
princepawn has asked for the wisdom of the Perl Monks concerning the following question:
Since there have been very few New Nodes today, I thought I would give everyone something to -- on. Heheh.
Most of you are familiar with Andy Wardley's App::Config module. If not, let me explain. This module reads a series of key = value pairs from a text file, with the ability to store these key/value pairs in appropriate keyed hashes. E.g., This would create a nested hash, with backup, logging and db as first-level keys, accessible from your program as: Or, you can make use of easy nested navigation (a functionality oft-reapeated in other modules --- (Data::DRef, Boulder, cpan:Template) and separate the elements of the path with dots. Anyway, what I am realizing is that there is a least one other way of initializing an application, and that is via its command-line arguments (Getopt::Long, Getopt:Std, Getopt::Mixed). So I began to wonder, how many ways can (and should) a Perl application allow itself to be configured? Let's not forget we could also have per-user configuration which portends the use of databases keyed on username (like the Almighty Technological Innovation of One-click Ordering at Amazon.com --- lol). So give your input. -- to your heart's content. Share your experience. Do something exciting on this Monday morning we all wanted to be over 6 hours ago. Over and out, the Monk You Love to Hate princepawn. heheh
Back to
Seekers of Perl Wisdom
|
|