in reply to A little config parsing.

Why not just make the config in Perl code and require it?
my %conf = ( Kuro5hin => { url => 'http://www.kuro5hin.org', key => 'k5', story_tag => 'item', } );
Or use Data::Denter? Or one of the millions of config parsing modules on CPAN?

Replies are listed 'Best First'.
Re: Re: A little config parsing.
by rendler (Pilgrim) on Jan 11, 2002 at 09:10 UTC

    That's a good idea, never thought of it ;)

    As for using a module, I just needed something simple without needing too many lines to work it or use anything external.

Re: Re: A little config parsing.
by cforde (Monk) on Jan 12, 2002 at 01:44 UTC
    I second the suggestion of using a prewritten parser. I like Config::IniFiles which parses INI format files like this:

    [Linux Today] url = http://linuxtoday.org story_tag = item title_tag = title link_tag = link refresh = 1800
    If you really can't use an external module, this format is very simple to parse yourself. It's also easy to understand, and probably familiar to the person following you...

    Have fun,
    Carl Forde