[Config-loader] Config::Loader wiki

Robert Krimen robertkrimen at gmail.com
Wed Aug 20 17:38:03 BST 2008


The wiki looks like a good start

I put the following on the wiki (under the interface section):

Here is an interface suggestion from my work on Config::JFDI (which is built
to ape Catalyst's config loading):

# Load the config directly
my $config =3D Config::Loader->new( file =3D> path/to/config.conf )

# Guess at possible config files
my $config =3D Config::Loader->new( name =3D> xyzzy, path =3D>
path/to/application_home/ )


path/to/application_home/xyzzy.conf
path/to/application_home/xyzzy_local.conf
path/to/application_home/xyzzy.yml
path/to/application_home/xyzzy_local.yml
...

With the second style of instantiation, Config::JFDI will also lookup
$ENV{uc $name . _CONFIG}, etc. for ENV overriding

Another parameter of env_lookup can indicate what other %ENV values to look
for, although I'm not sure if it's necessary

The parameter no_env can be used to disable %ENV lookup altogether

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/config-loader/attachments/20080820/=
7ec7da2c/attachment.htm


More information about the Config-loader mailing list