X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FIndex.pm;h=59026cf002038f629ebc6ce21badccf79c7e9b32;hp=95ed8b5f6e138286f4ad69ae738504ca7b949eee;hb=a9dc674c99f36ff40d94b80753a1504074ba5e22;hpb=b0bb11ec8c056e043e87cd7733125ffc9d9bcfb0 diff --git a/lib/Catalyst/DispatchType/Index.pm b/lib/Catalyst/DispatchType/Index.pm index 95ed8b5..59026cf 100644 --- a/lib/Catalyst/DispatchType/Index.pm +++ b/lib/Catalyst/DispatchType/Index.pm @@ -24,12 +24,11 @@ See L. sub match { my ( $self, $c, $path ) = @_; return if @{ $c->req->args }; - my $result = @{ $c->get_action( 'index', $path ) || [] }[-1]; + my $result = $c->get_action( 'index', $path ); - # 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('index'); $c->req->match( $c->req->path ); return 1;