http://www.perlmonks.org?node_id=585631


in reply to Re: Config Files in Perl
in thread Config Files in Perl

... why not just go with XML?

Because humans might have to modify the configuration file?

Replies are listed 'Best First'.
Re^3: Config Files in Perl
by traveler (Parson) on Nov 22, 2006 at 23:06 UTC
    They might. OTOH it might all be done by software. That wasn't specified.

    Now, I agree that XML is not beautiful, but so many people who might edit config files probably are at least somwehat used to HTML, and even vim knows XML highlighting. I do not think it is a problem unless the config file designer goes wild...

      You should be programming away from bad/worst case scenario not around assumptions about the end-user.

      XML sure is terse and unweildy, no matter whether a human is used to it or not, the chances of things going wrong as a result of a "configuration error" when manually editing XML are high.

      However, in the day and age of RAD, it's wise and definitely feasible to have a UI manage and maintain the configuration file(s), XML or otherwise.
        XML sure is terse and unweildy, no matter whether a human is used to it or not, the chances of things going wrong as a result of a "configuration error" when manually editing XML are high.

        Hmmm, I think I disagree. I think with a well-written DTD, XML configs are significantly less error prone than lots of lines of name=value.

        This has got me very interested. Maybe it should be a subject for a Meditation and/or some research...