Re: Which configuration module?
by reneeb (Chaplain) on Oct 20, 2006 at 09:21 UTC
|
| [reply] [Watch: Dir/Any] |
Re: Which configuration module?
by Molt (Chaplain) on Oct 20, 2006 at 10:10 UTC
|
I personally use AppConfig, the main reasons being that I've never had any trouble with it (despite using it for some quite nasty configurations), and that many of the things I write use TT2 and since AppConfig's a dependancy of TT2 it's one less thing to need to roll-out to servers.
It can also handle configs in both UNIX and Windows styles, which is occasionally useful.
| [reply] [Watch: Dir/Any] |
Re: Which configuration module?
by jdtoronto (Prior) on Oct 20, 2006 at 13:30 UTC
|
I use Config::Simple it works very well, except for the tied hash interface where it flattens the sections into a single hash which when dumped looks like:
'newsletter.owner_p1_font' => [],
'newsletter.contact_font' => 'Helvetica',
'newsletter.owner_city' => 'Hamilton',
'system.debug' => '1',
'armtwo.username' => [],
'newsletter.contact_y' => '150',
The tied method of Config::IniFiles is more intuitive.
Config::Simple is pretty widely used and if you have a problem the developer is very responsive.
jdtoronto | [reply] [Watch: Dir/Any] [d/l] |
Re: Which configuration module?
by Fletch (Bishop) on Oct 20, 2006 at 13:04 UTC
|
While not strictly a "configuration module", YAML (or YAML::Syck) might be of use.
| [reply] [Watch: Dir/Any] |
Re: Which configuration module?
by EvanK (Chaplain) on Oct 20, 2006 at 13:53 UTC
|
It all depends on the complexity of what you're needing a configuration file for.
If its something relatively simple, use Config::Simple. its a VERY quick and useful format of one-to-one name->value pairs that supports comments and INI-style sections (depending on how you configure your instance of it).
if you need something more complex, I highly recommend Config::General. this has the added advantage of using a (more or less) Apache-style configuration format, and all its cool little uses: repeatable options, nested options, inclusion of other config files, and more. this all comes at a slight performance cost as opposed to Config::Simple, of course.
__________ Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
- Terry Pratchett
| [reply] [Watch: Dir/Any] |
Re: Which configuration module?
by philcrow (Priest) on Oct 20, 2006 at 13:12 UTC
|
I like Config::General and I usually use it in the Gantry::Conf config framework which gives much flexibility while providing a single master conf file for everything on a server.
Phil | [reply] [Watch: Dir/Any] |
Re: Which configuration module?
by fmerges (Chaplain) on Oct 20, 2006 at 13:36 UTC
|
Hi,
I use YAML and sometimes AppConfig.
Regards,
fmerges at irc.freenode.net
| [reply] [Watch: Dir/Any] |
Re: Which configuration module?
by tilly (Archbishop) on Oct 20, 2006 at 17:59 UTC
|
What do you want in a configuration module?
See Re (tilly) 6: using strict and a config file for a fairly reasonable list of wants that I had at one point, which none of those modules provides. (For the record, I'm still happy with pure Perl configuration files.) | [reply] [Watch: Dir/Any] |
|
Well, I second tilly's requirements in this post.
My requirements to a configuration module are:
- Allow nested categories.
- Allow list values (e.g. users=tinkywinky,dipsy,lala,po).
- Warn on access attempt to undefined variables.
I am unfamiliar with have these requirements are covered, but thanks to excellent response from the monks, I have a good starting point for finding the way.
Thanks.
Andreas
--
| [reply] [Watch: Dir/Any] |