Skip to content

Commit

Permalink
simplify configuration merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 22, 2014
1 parent 78637fd commit e4fb6f5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Mojolicious/Plugin/Config.pm
Expand Up @@ -51,10 +51,7 @@ sub register {
# Merge everything
$config = {%$config, %{$self->load($mode, $conf, $app)}} if $mode;
$config = {%{$conf->{default}}, %$config} if $conf->{default};
my $current = $app->defaults(config => $app->config)->config;
%$current = (%$current, %$config);

return $current;
return $app->defaults(config => $app->config)->config($config)->config;
}

1;
Expand Down

0 comments on commit e4fb6f5

Please sign in to comment.