X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FController.pm;h=1bc8e2a2645a248fff000ce6312c11d13242716f;hp=ce68f8e8c19e8746b45dde21b168eaf7d729296a;hb=gsoc_breadboard;hpb=d6ae510491d8cc02625d845d6e08063209d8f193 diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index ce68f8e..1bc8e2a 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -187,6 +187,12 @@ around action_namespace => sub { my $class = ref($self) || $self; my $appclass = ref($c) || $c; + + # FIXME - catalyst_component_name is no longer a class accessor, because + # 'MyApp as a controller' behavior is removed. But is this call to + # catalyst_component_name necessary, or is it always the same as $class? + my $component_name = ref($self) ? $self->catalyst_component_name : $self; + if( ref($self) ){ return $self->$orig if $self->has_action_namespace; } else { @@ -208,7 +214,7 @@ around action_namespace => sub { } } - my $namespace = Catalyst::Utils::class2prefix($self->catalyst_component_name, $case_s) || ''; + my $namespace = Catalyst::Utils::class2prefix($component_name, $case_s) || ''; $self->$orig($namespace) if ref($self); return $namespace; };