X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController.pm;h=cc1a514600fff5bfe0a10aa4bf19a4d598cc6fbb;hb=b527cc7dcdd41126b6f600531d64911ae59302ba;hp=16b5a386f194ef928b4a6fe4e1d03270e78c9f8d;hpb=215c10b1510e882b4eb2a3bed2d5910b6688c41a;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 16b5a38..cc1a514 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -154,6 +154,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 { @@ -175,7 +181,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; };