Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Configuration files

by keyslapper (Novice)
on Jan 01, 2005 at 18:19 UTC ( [id://418669]=note: print w/replies, xml ) Need Help??


in reply to Re: Configuration files
in thread Configuration files

That might be an option. Of course, the script these requirements were written over is less than 10K, but I'm sure looking at the YAML code will offer some useful methods.

And learning from someone else's code is always a good option :)

Replies are listed 'Best First'.
Re^3: Configuration files
by qq (Hermit) on Jan 01, 2005 at 18:29 UTC

    You could do worse that Config::Tiny. Its INI file format, which is familiar to many, pure perl, and very short. So you include it in the distribution, or copy/paste it in.

      The OP specified he needed complex data structures, which Config::Tiny does not support. (I like it too though!)

        Its not really clear how much is needed: "assign values to arrays and hashes" covers a wide range. INI does not get you very far, of course, and I often have comma separated values on one line. But the code is nice if the OP just needs something to work from.

        On the question of 'additional modules', what you've tried to explain above is true. If you are distributing a script, there is really no difference to distributing it with the addition of another pure perl file that just happens to be a CPAN module rather than one you've written yourself. You can even inline it in the main script if just having one file eases people's concerns.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://418669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found