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;fp=lib%2FCatalyst%2FDispatchType%2FDefault.pm;h=dba3951fbceb410ccc4c3e4500b1d547a3f2c8bb;hp=08a49487627829fa1ad281d211d1d4312791ff54;hb=a9dc674c99f36ff40d94b80753a1504074ba5e22;hpb=b0bb11ec8c056e043e87cd7733125ffc9d9bcfb0 diff --git a/lib/Catalyst/DispatchType/Default.pm b/lib/Catalyst/DispatchType/Default.pm index 08a4948..dba3951 100644 --- a/lib/Catalyst/DispatchType/Default.pm +++ b/lib/Catalyst/DispatchType/Default.pm @@ -24,12 +24,12 @@ See L. sub match { 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]; + my $result = ($c->get_actions('default', $c->req->path))[-1]; # Find default on namespace or super if ($result) { - $c->action( $result->[0] ); - $c->namespace( $result->[0]->namespace ); + $c->action( $result ); + $c->namespace( $result->namespace ); $c->req->action('default'); # default methods receive the controller name as the first argument unshift @{ $c->req->args }, $path;