Branch for making TestApp not have actions in the app class
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index fbfb3bf..7556e34 100644 (file)
@@ -2215,6 +2215,10 @@ sub setup_component {
 
     my $suffix = Catalyst::Utils::class2classsuffix( $component );
     my $config = $class->config->{ $suffix } || {};
+    # Stash _component_name in the config here, so that custom COMPONENT
+    # methods also pass it. local to avoid pointlessly shitting in config
+    # for the debug screen, as $component is already the key name.
+    local $config->{_component_name} = $component;
 
     my $instance = eval { $component->COMPONENT( $class, $config ); };