PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` package Config::Merge; use strict; use warnings FATAL => 'all', NONFATAL => 'redefine'; use File::Spec(); use File::Glob 'bsd_glob'; use Storable(); use overload ( '&{}' => sub { my $self = shift; return sub { $self->C(@_) } }, 'fallback' => 1 ); use vars qw($VERSION); $VERSION = '1.04'; =head1 NAME Config::Merge - load a configuration directory tree containing YAML, JSON, XML, Perl, INI or Config::General files =head1 SYNOPSIS OO style ------------------------------------------------------- use Config::Merge(); my $config = Config::Merge->new('/path/to/config'); @hosts = $config->('db.hosts.session'); $hosts_ref = $config->('db.hosts.session'); @cloned_hosts = $config->clone('db.hosts.session'); ------------------------------------------------------- OR Functional style ------------------------------------------------------- # On startup use Config::Merge('My::Config' => '/path/to/config'); # Then, in any module where you want to use the config package My::Module; use My::Config; @hosts = C('db.hosts.sesssion'); $hosts_ref = C('db.hosts.sesssion'); @cloned_hosts = My::Config::clone('db.hosts.session'); $config = My::Config::object; ------------------------------------------------------- ADVANCED USAGE OO style ------------------------------------------------------- my $config = Config::Merge->new( path => '/path/to/config', skip => sub {} | regex | {} , is_local => sub {} | regex | {} , load_as => sub {} | regex , sort => sub {} , debug => 1 | 0 ); ------------------------------------------------------- Functional style ------------------------------------------------------- use Config::Merge( 'My::Config' => '/path/to/config', { skip => sub {} | regex | {} , is_local => sub {} | regex | {} , load_as => sub {} | regex , sort => sub {} , debug => 1 | 0 } ); # Also, you can subclass these: package My::Config; sub skip { ... } ------------------------------------------------------- =head1 DESCRIPTION Config::Merge is a configuration module which has six goals: =over =item * Flexible storage Store all configuration in your format(s) of choice (YAML, JSON, INI, XML, Perl, Config::General / Apache-style config) broken down into individual files in a configuration directory tree, for easy maintenance. See L =item * Flexible access Provide a simple, easy to read, concise way of accessing the configuration values (similar to L