Initial support for :Args attribute
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Index.pm
index 59026cf..f876850 100644 (file)
@@ -15,9 +15,7 @@ See L<Catalyst>.
 
 =head1 METHODS
 
-=over 4
-
-=item $self->match( $c, $path )
+=head2 $self->match( $c, $path )
 
 =cut
 
@@ -26,8 +24,8 @@ sub match {
     return if @{ $c->req->args };
     my $result = $c->get_action( 'index', $path );
 
-    if ($result) {
-        $c->action( $result );
+    if ($result && $result->match($c)) {
+        $c->action($result);
         $c->namespace( $result->namespace );
         $c->req->action('index');
         $c->req->match( $c->req->path );
@@ -36,8 +34,6 @@ sub match {
     return 0;
 }
 
-=back
-
 =head1 AUTHOR
 
 Sebastian Riedel, C<sri@cpan.org>