Home > Archive > PERL Beginners > October 2005 > Config File Layout
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Config File Layout
|
|
| Ryan Frantz 2005-10-20, 9:55 pm |
| Perlers,
I'm working on a script that will need to email clients if it finds
files in their respective outbound directories. I've decided on a
simple config file:
[foo]
someone@here.com
[bar]
nobody@there.org
everybody@place.net
I've written a simple parser but it doesn't check for incorrect syntax.
I looked at some of the Config:: modules and they appear to require
Name=Value pairs.
So my question is one of design; should I use the name=value pairing and
one of the Config:: modules, or just leave it as is? I'm going to be
the only one maintaining the config file but, of course, I want the
script and config file to be maintainable even if I'm not around.
ry
| |
| Wiggins d'Anconia 2005-10-20, 9:55 pm |
| Ryan Frantz wrote:
> Perlers,
>
>
>
> I'm working on a script that will need to email clients if it finds
> files in their respective outbound directories. I've decided on a
> simple config file:
>
>
>
> [foo]
>
> someone@here.com
>
>
>
> [bar]
>
> nobody@there.org
>
> everybody@place.net
>
>
>
>
>
> I've written a simple parser but it doesn't check for incorrect syntax.
> I looked at some of the Config:: modules and they appear to require
> Name=Value pairs.
>
>
>
> So my question is one of design; should I use the name=value pairing and
> one of the Config:: modules, or just leave it as is? I'm going to be
> the only one maintaining the config file but, of course, I want the
> script and config file to be maintainable even if I'm not around.
>
>
One of the Config:: modules should handle your format above. You might
also consider AppConfig,
http://search.cpan.org/~abw/AppConf...ib/AppConfig.pm
HTH,
http://danconia.org
>
> ry
>
>
|
|
|
|
|