sub action_namespace {
my ( $self, $c ) = @_;
- return $self->config->{namespace} if exists $self->config->{namespace};
+ my $hash = (ref $self ? $self : $self->config);
+ return $hash->{namespace} if exists $hash->{namespace};
return Catalyst::Utils::class2prefix( ref($self) || $self,
$c->config->{case_sensitive} )
|| '';