NAME
Catalyst::Plugin::ConfigLoader::Etc - Load etc config files
SYNOPSIS
package MyApp;
use Catalyst qw/ConfigLoader::Etc/;
__PACKAGE__->config(
'Plugin::ConfigLoader::Etc' => {
files => [
"$FindBin::Bin/etc/conf/test1.yml",
]
}
);
In the file, assuming it's in YAML format:
foo: bar
Accessible through the context object, or the class itself
$c->config->{foo} # bar
MyApp->config->{foo} # bar
DESCRIPTION
config via env, for instance, $ENV{APPNAME_CONFIG_ETC} = "$FindBin::Bin/etc/conf/local.yml"; config('Plugin::ConfigLoader::Etc' => { files => [ '/path/to/config_file', '/path/to/xx_config' ] }
METHODS
find_files
This method determines the potential file paths to be used for config loading It returns an array of paths (up to the filename less the extension), It is then passed to Catalyst::Plugin::ConfigLoader for actual configuration loading and processing.
_find_etc_files
Loading custom config files
AUTHOR
zdk (Warachet Samtalee), <zdk at cpan.org>
COPYRIGHT & LICENSE
Copyright 2012 zdk (Warachet Samtalee), all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
If you'd like to use it under a different license, that's probably OK. Please contact the author.