Hello fellow monks.
I've been working on a few scripts that have gone beyond simple command-line swtich configuration and have progressed right into needing some sort of configuration file. After having tried severl solutions, I realized that I was unsure of the best (or perhaps my favorite) way of storing program settings.
The three that I have seen/tried have been useful in different ways. The first method is the simple "this=that" in a file that you read in and make your settings. The second method was a perl file that the program simply read in and set up the parameters. The third was actually a configuration file I saw, and it was done in XML. Each of these have their pluses and minuses. I was wondering what people thought about these methods and whether there were ones I was missing out on.
-
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 How to display code and escape characters
are good places to start.
|