X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FIndex.pm;h=dd8b0105fce90fc5caa14d917217eae1aced69f0;hb=855ed93153e2b0c0e88d9bb8f23822c914393048;hp=e0203e6ab194c9b1f1c93c815fc282ed228ae6c4;hpb=772ab8ae1affcaed555bfdb070e18ed1af592b71;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/DispatchType/Index.pm b/lib/Catalyst/DispatchType/Index.pm index e0203e6..dd8b010 100644 --- a/lib/Catalyst/DispatchType/Index.pm +++ b/lib/Catalyst/DispatchType/Index.pm @@ -15,21 +15,18 @@ See L. =head1 METHODS -=over 4 - -=item $self->match( $c, $path ) +=head2 $self->match( $c, $path ) =cut 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( $c->req->path ); + $c->action($result); + $c->namespace( $result->namespace ); $c->req->action('index'); $c->req->match( $c->req->path ); return 1; @@ -37,8 +34,6 @@ sub match { return 0; } -=back - =head1 AUTHOR Sebastian Riedel, C