improved docs for action_namespace and path_prefix and made path configurable
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Default.pm
index 62308c3..58779fa 100644 (file)
@@ -15,9 +15,10 @@ See L<Catalyst>.
 
 =head1 METHODS
 
-=over 4
+=head2 $self->match( $c, $path )
 
-=item $self->match( $c, $path )
+Check if default action matches, and set action if it does. 
+Will be called last for each controller.
 
 =cut
 
@@ -27,7 +28,7 @@ sub match {
     my $result = ( $c->get_actions( 'default', $c->req->path ) )[-1];
 
     # Find default on namespace or super
-    if ($result) {
+    if ($result && $result->match($c)) {
         $c->action($result);
         $c->namespace( $result->namespace );
         $c->req->action('default');
@@ -40,8 +41,6 @@ sub match {
     return 0;
 }
 
-=back
-
 =head1 AUTHOR
 
 Matt S Trout