X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FDefault.pm;h=ab9de5e8e333a1ba044d266e8e07bf032cf6cab1;hp=1c0d5bf4daf8e3b201d0c4e6d302badece612adb;hb=78d760bb64c2142042834b11911b728259e3005d;hpb=22f3a8dd32e5940d87a1d21642fa39c7813bc921 diff --git a/lib/Catalyst/DispatchType/Default.pm b/lib/Catalyst/DispatchType/Default.pm index 1c0d5bf..ab9de5e 100644 --- a/lib/Catalyst/DispatchType/Default.pm +++ b/lib/Catalyst/DispatchType/Default.pm @@ -4,10 +4,11 @@ use strict; use base qw/Catalyst::DispatchType/; sub prepare_action { - my ($self, $c, $path) = @_; - return if $path =~ m!/!; # Not at root yet, wait for it ... - my $result = @{$c->get_action('default', $c->req->path, 1) || []}[-1]; - # Find default on namespace or super + my ( $self, $c, $path ) = @_; + return if $path =~ m!/!; # Not at root yet, wait for it ... + my $result = @{ $c->get_action( 'default', $c->req->path, 1 ) || [] }[-1]; + + # Find default on namespace or super if ($result) { $c->action( $result->[0] ); $c->namespace( $c->req->path );