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.,

[db] username = Python password = sucks [backup] machine = guido frequency = 4 hours [logging] file = /var/log/applog level = 2
This would create a nested hash, with backup, logging and db as first-level keys, accessible from your program as:
$app->{logging}->{file}
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


In reply to What are all the means of application configuration? by princepawn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.