0.08 Mon May 15 2006\r
- added get_config_path() which extracts the path finding code\r
- added the ability to specify a MYAPP_CONFIG ENV variable\r
+ - fixed debug typo\r
+ - more granular merging of top-level hashrefs\r
\r
0.07 Mon May 01 2006\r
- added Config::General support\r
my $config = $loader->load( $_ );\r
\r
$c->log->debug( "Loaded Config $_" ) if $c->debug;\r
- _fix_syntax( $config );\r
- $c->config( $config ) if $config;\r
+ \r
+ next if !$config;\r
+\r
+ _fix_syntax( $config );\r
+ \r
+ # merge hashes 1 level down\r
+ for my $key ( keys %$config ) {\r
+ if( exists $c->config->{ $key } ) {\r
+ my $isa_ref = ref $config->{ $key };\r
+\r
+ next if !$isa_ref or $isa_ref ne 'HASH';\r
+\r
+ my %temp = ( %{ $c->config->{ $key } }, %{ $config->{ $key } } );\r
+ $config->{ $key } = \%temp;\r
+ }\r
+ }\r
+ \r
+ $c->config( $config );\r
}\r
}\r
\r