Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageRyan 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 > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.