X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController.pm;h=1bc8e2a2645a248fff000ce6312c11d13242716f;hb=add5e412d1a0b3c464c49596ed547f271c604c95;hp=445d4afee682d8d35bed1c26cadbb6e43d5cc2c3;hpb=0b0aee670c39f8cb8f140eb62de9bfaf2c343a24;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 445d4af..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; }; @@ -275,7 +281,7 @@ sub register_action_methods { my $attributes = $method->can('attributes') ? $method->attributes : []; my $attrs = $self->_parse_attrs( $c, $name, @{ $attributes } ); if ( $attrs->{Private} && ( keys %$attrs > 1 ) ) { - $c->log->debug( 'Bad action definition "' + $c->log->warn( 'Bad action definition "' . join( ' ', @{ $attributes } ) . qq/" for "$class->$name"/ ) if $c->debug;