Not an opinion, just an observation:

A recent Java magazine column by someone that I know is respected in the field (name slips me, unfortunately) had a recent article on using Windows .INI-like files as application initialization files, and proceeded to discuss the ways of reading and writing such files in Java. The next month, the same author had a followup column, starting off that he recently a lot of email lambasting him for not using XML; the followup column was how to use the same ideas in Java but using an XML-based system.

Now some opinions :-). I think a lot has to do with what you expect your config structure to look like and what you expect your audience to be able to use. Are you mostly just initializing a hash of items? Appconfig is probably the right choice. Maybe you expect that users should have an easy time of changing the config file, again making appconfig better. Right now, Appconfig config files are probably not hard to understand, while XML may be; however, in the near future, I'm sure we'll see tree-based editors that make the handling of XML editing very easy and thus making an XML file a better choice.

But more importantly: Why not include both? XML::Simple is sufficiently smart enough that if it immediately recongize the file as XML, it will die out, and this allows you to drop through to Appconfig. XML::Simple is sufficiently lightweight to not pose a big problem in terms of CPU and memory use on your apps. The only major concern is that you might have to massage the returned hashes from either XML::Simple or Appconfig to make sure that you are working with the same hash structure from each.

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important


In reply to Re: AppConfig or XML::Simple for All my modules? by Masem
in thread AppConfig or XML::Simple for All my modules? 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.