[San-Diego-pm] Config modules
Chris Grau
chris at chrisgrau.com
Fri Aug 19 08:34:55 PDT 2011
As promised, I ack'd through my ~/src to see which Config:: modules I've
been using. It came down to three. In order of frequency:
* Config::Std[1]
I originally started using this one after Damian presented it,
and I really liked the data structure it returned. However, due
to its overhead and the fact that I rarely need round-trippable
config files, I'm slowly discontinuing its use.
* Config::General[2]
This is my current favorite, due to its flexibility.
* Config::IniFiles[3]
This is starting to show up in scripts that use an INI-style
configuration format that doesn't require the flexibility of
Config::General.
Once upon a time, we also use App::Config, which had some nice features
like file inclusion. But Config::General has replaced that
functionality for us.
I've also written a module called LSF::ConfigParser (unreleased), which
is designed as a generic parser for all LSF configuration files. Other
modules can then use it to build up a data structure from any file. I
should probably make it sub-classable and use polymorphism to extend it,
but that's a project for another day. We're also looking at using it
for our own LSF-related configuration files, for a consistent format.
[1] http://search.cpan.org/dist/Config-Std/
[2] https://metacpan.org/module/Config::General
[3] https://metacpan.org/module/Config::IniFiles
More information about the San-Diego-pm
mailing list