X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FComponent.pm;h=9cbe331978702023ff93d51ff7bcca244deb2478;hp=52736f468a41fe2a8c61e453cdaeccb24bc77acc;hb=615bfadf17b568b98fe61ac76a19767c90f9f58a;hpb=9f6c5fdc8776506a0183270cfe64f4442e4ced13 diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index 52736f4..9cbe331 100644 --- a/lib/Catalyst/Component.pm +++ b/lib/Catalyst/Component.pm @@ -8,7 +8,7 @@ has _config => ( is => 'rw', isa => 'HashRef', required => 1, - default => {} + default => sub { {} } ); class_has _plugins => ( is => 'rw' ); @@ -66,9 +66,9 @@ around new => sub { # Temporary fix, some components does not pass context to constructor my $arguments = ( ref( $_[-1] ) eq 'HASH' ) ? $_[-1] : {}; - my $merged = $self->merge_config_hashes( $self->config, $arguments ) ); + my $merged = $self->merge_config_hashes( $self->config, $arguments ); $orig->( $self, $merged ); -} +}; sub COMPONENT { my ( $self, $c ) = @_;