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:[db] username = Python password = sucks [backup] machine = guido frequency = 4 hours [logging] file = /var/log/applog level = 2
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.$app->{logging}->{file}
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
In reply to What are all the means of application configuration? by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |