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=1f1fbb509f5b6cb0930dc59f4f6c3809c7b936e5;hp=68dbcdb929bcfb05fbd68975ec74a299e5af8c07;hb=2ef599586739f410da035904753378000a368a44;hpb=afbb9aa373e2cef661a0429ca36d9dd971a40cf8 diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index 68dbcdb..1f1fbb5 100644 --- a/lib/Catalyst/Component.pm +++ b/lib/Catalyst/Component.pm @@ -57,15 +57,16 @@ component loader with config() support and a process() method placeholder. __PACKAGE__->mk_classdata('_plugins'); __PACKAGE__->mk_classdata('_config'); -around new => sub { - my ( $orig, $self) = @_; - +sub BUILDARGS { + my ($self) = @_; + # Temporary fix, some components does not pass context to constructor my $arguments = ( ref( $_[-1] ) eq 'HASH' ) ? $_[-1] : {}; my $args = $self->merge_config_hashes( $self->config, $arguments ); - $self->$orig( $args ); -}; + + return $args; +} no Moose;