From: Matt S Trout Date: Wed, 31 May 2006 01:32:21 +0000 (+0000) Subject: Base takes namespace from self if object X-Git-Tag: 5.7099_04~558 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=9488795ca5244087fc99828f92d70769d9f80b22 Base takes namespace from self if object --- diff --git a/lib/Catalyst/Base.pm b/lib/Catalyst/Base.pm index 0671838..16eae62 100644 --- a/lib/Catalyst/Base.pm +++ b/lib/Catalyst/Base.pm @@ -85,7 +85,8 @@ Determine the namespace for actions in this component. 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} ) || '';