X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=cd40aef9a54f345f6e201902b2ae02f479c70b4d;hb=5d02e7902fb093a28deeea34bd4bd8a729e78be4;hp=f1c63fd69a3ca21c60bc7a963a8983d374eb49e2;hpb=c6e5058f2acfe2ef1f6961191b1961db1d0295e4;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index f1c63fd..cd40aef 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -331,7 +331,7 @@ all 'dies' within the called action. If you want C to propagate you need to do something like: $c->forward('foo'); - die $c->error if $c->error; + die join "\n", @{ $c->error } if @{ $c->error }; Or make sure to always return true values from your actions and write your code like this: @@ -2224,8 +2224,11 @@ sub setup_components { } for my $component (@comps) { - $class->components->{ $component } = $class->setup_component($component); - for my $component ($class->expand_component_module( $component, $config )) { + my $instance = $class->components->{ $component } = $class->setup_component($component); + my @expanded_components = $instance->can('expand_modules') + ? $instance->expand_modules( $component, $config ) + : $class->expand_component_module( $component, $config ); + for my $component (@expanded_components) { next if $comps{$component}; $class->_controller_init_base_classes($component); # Also cover inner packages $class->components->{ $component } = $class->setup_component($component);