X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=ff4ad244f839d06c1486c425dad9bff2d8f22532;hp=a3a0e3924fd31da5a359c21e66f4b947282bca49;hb=7cee84a9da0fc31861e2f81d333be5dac73e15d5;hpb=7dac038c9d0d69aefa96bde4a1d574d0f983c684 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index a3a0e39..ff4ad24 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2916,10 +2916,10 @@ sub setup_components { # of named components in the configuration that are not actually existing (not a # real file). - $class->setup_injected_components; + my @injected = $class->setup_injected_components; # All components are registered, now we need to 'init' them. - foreach my $component_name (keys %{$class->components||+{}}) { + foreach my $component_name (@injected, @comps) { $class->components->{$component_name} = $class->components->{$component_name}->() if (ref($class->components->{$component_name}) || '') eq 'CODE'; } @@ -2940,6 +2940,9 @@ sub setup_injected_components { $injected_comp_name, $class->config->{inject_components}->{$injected_comp_name}); } + + return map { $class ."::" . $_ } + @injected_components; } =head2 $app->setup_injected_component( $injected_component_name, $config )