X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=cd1f57ee4c4014f51dad1d011da24ed20e17d6e3;hb=53119b7876049abfe0d4e4bea5e85724dd4778d7;hp=ca5bc2527b493686ca1a235f2abcc578820e7f03;hpb=cccc8f68ace5d11c3fdcbfc4e353225b3b574255;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index ca5bc25..cd1f57e 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -285,7 +285,7 @@ sub prepare_action { s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg for grep { defined } @{$c->req->captures||[]}; $c->log->debug( 'Path is "' . $c->req->match . '"' ) - if ( $c->debug && $c->req->match ); + if ( $c->debug && length $c->req->match ); $c->log->debug( 'Arguments are "' . join( '/', @args ) . '"' ) if ( $c->debug && @args ); @@ -301,7 +301,7 @@ sub get_action { my ( $self, $name, $namespace ) = @_; return unless $name; - $namespace = join( "/", grep { length } split '/', $namespace || "" ); + $namespace = join( "/", grep { length } split '/', ( defined $namespace ? $namespace : "" ) ); return $self->action_hash->{"$namespace/$name"}; }