Config::Divide - config loader like Catalyst::Plugin::ConfigLoader
use Config::Divide; my @config_paths = qw{ /path/to/main/config/files /path/to/sub/config/files }; my %config_any_options = ( # you can set option of Config::Any->load_files # for example... # filter => \&filter, ); my $config; $config = Config::Divide->load_config( { config_paths => \@config_paths, config_any_options => \%config_any_options, } ); # or $config = Config::Divide->load_config( \@config_paths, \%config_any_options, );
Config::Divide is config loader like Catalyst::Plugin::ConfigLoader.
you can set path(s) that main (and sub) config files. if you set sub config files' path, and there are same items in main config and sub config, then main item will be overwritten by sub config data.
path to config files. you can set one (and more) path(s). priority of 1st path is lowest, and 2nd path's is secondly low. if there are same items, low priority data will be overwritten by higher priority config data.
option of Config::Any->load_files. in Config::Divide, use option {use_ext => 1} only. if you set value to %config_any_option, default value will be overwritten.
hirafoo <hirafoo@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Catalyst::Plugin::ConfigLoader
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Config::Divide, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Divide
CPAN shell
perl -MCPAN -e shell install Config::Divide
For more information on module installation, please visit the detailed CPAN module installation guide.