Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
In this node I said that for large config files (a condition of the OP) that I preferred XML to many other mechanisms including oodles of name=value pairs. Later on in the thread, in response to comments about the possibilities of misconfiguration with XML files, I suggested using a well-written DTD.

I suggested this because I believe that if a DTD is well-written, it can be validated by an external program and the config file can be validated against the DTD by an external program. They can also be validated by the app itself, but that may be undesirable. Some issues might be: long startup time to discover a bad config file, a poorly written app that does not check all of the config file before using it and dies into the running when errors are encountered.

For me, though, I like the idea of being able to tell a running program (e.g. via a button or signal) to re-read a config file to cause changes to occur. It is nice if the file is externally validated before it is reread. Not that everyone has such a need, but in the development phase, it is sometimes nice. Also, I like being able to have an external description of the config file (a DTD) that I can keep in one place on a network that many apps/validators can share. It sure makes maintenance easy. (Yes, one could do that with other formats, but it is "built in" to the whole DTD concept.) I also like the idea of the whole config file being sucked into the app as a large data structure I can access "easily".

Anyway, I would like to know what others think about configuration files.

In reply to Config Files Redux by traveler

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2021-10-23 02:52 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (86 votes). Check out past polls.