X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=44e5afe9edf562e3c14713664594949e967b75da;hp=a9ad5a44a2ee2b2ae77a2f986c11f1cc592f4d40;hb=f3d0bbcf1bcf247e803f2229c0693114cc3a9170;hpb=bcccee4e7d7b98c151448074e83c6201ef434476 diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index a9ad5a4..44e5afe 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -259,15 +259,19 @@ sub get_action { foreach my $child ( $inherit ? @match : $match[-1] ) { my $node = $child->actions; - unless ($inherit) { - $namespace = '' if $namespace eq '/'; - my $reverse = $node->{$action}->reverse; - my $name = $namespace - ? $namespace =~ /\/$/ ? "$namespace$action" : "$namespace/$action" - : $action; - last unless $name eq $reverse; + if ( defined $node->{$action} ) { + unless ($inherit) { + $namespace = '' if $namespace eq '/'; + my $reverse = $node->{$action}->reverse; + my $name = $namespace + ? $namespace =~ /\/$/ + ? "$namespace$action" + : "$namespace/$action" + : $action; + last unless $name eq $reverse; + } + push( @results, [ $node->{$action} ] ); } - push( @results, [ $node->{$action} ] ) if defined $node->{$action}; } return \@results; }