X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=cd1f57ee4c4014f51dad1d011da24ed20e17d6e3;hb=87eab0143602ccd99d8737b78970e476c0196b82;hp=ff25f969c1580f78422425f63c519d0cad0f2078;hpb=81e75875ca7cea9004783a0c142040081da630d8;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index ff25f96..cd1f57e 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -282,8 +282,10 @@ sub prepare_action { unshift @args, $arg; } + 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 ); @@ -299,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"}; } @@ -498,8 +500,8 @@ sub setup_actions { }; $walker->( $walker, $self->tree, '' ); - $c->log->debug( "Loaded Private actions:\n" . $privates->draw ) - if ($has_private); + $c->log->debug( "Loaded Private actions:\n" . $privates->draw . "\n" ) + if $has_private; # List all public actions $_->list($c) for @{ $self->dispatch_types };