NAME

Config::Divide - config loader like Catalyst::Plugin::ConfigLoader.

SYNOPSIS

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::Divide->load_config(
    config_paths       => \@config_paths,
    config_any_options => \%config_any_options,
);

DESCRIPTION

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's path, and there is same item in main config and sub config, then main item will be overwritten by sub config data.

METHODS

load_config(\@config_paths, [\%config_any_options])

@config_paths

path to config files. you can set one or two path. 1st path is main, and 2nd path is sub. if main and sub contain same item, main config will be overwritten by sub config data.

%config_any_options

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.

AUTHOR

hirafoo <hirafoo@cpan.org>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Catalyst::Plugin::ConfigLoader

1 POD Error

The following errors were encountered while parsing the POD:

Around line 110:

You forgot a '=back' before '=head1'