The frontier between what is a data and a configuration format seems sometime quite blurry.

INI are nice except when you have really nested information structure. They probably should only be used as configuration file, not as data store or worse read-write configuration files with some program state ad/or piece if code stored inside (I have seen both). If only because I may want to store configuration files on read-only media. And as previously highlighted by mr_mischief the INI format knows some various subtly incompatible variations.

XML is so well known for its abuses that there is no need to list them. But supported nearly everywhere it is a good language for serialization and multiplatform exchange. A use of XML that makes me seriously sick is XML as configuration file. For anything beyond simple parameters XML files are simply too verbose and have such a low ration informatio/noise that they become nightmarish (ex: most Java application servers hell). Please say no to XML configs !

YAML fits well between those too : as a light serialization language or for complex configurations, it is quite simple to parse (simpler than XML at least) and can represent complex structures very lisibly.

Using Perl code as configuration has the problem of executable code in config file which can induce tricky security problem and is at least more complicated to securize system (executable code on noexec partitions ?). Perl as data format, well … do you want to execute code coming from an external program in yours ?

Anyway thanks to superdoc for his helpful post (I did exact the same misreading …).


In reply to Re^6: An Idiot's Guide to YAML by Anonymous Monk
in thread An Idiot's Guide to YAML by scorpio17

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.