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 = 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,
  );

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

METHODS

load_config

@config_paths

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.

%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 132:

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