1 package Catalyst::DispatchType::Default;
4 use base qw/Catalyst::DispatchType/;
8 Catalyst::DispatchType::Default - Default DispatchType
18 =head2 $self->match( $c, $path )
23 my ( $self, $c, $path ) = @_;
24 return if $path =~ m!/!; # Not at root yet, wait for it ...
25 my $result = ( $c->get_actions( 'default', $c->req->path ) )[-1];
27 # Find default on namespace or super
30 $c->namespace( $result->namespace );
31 $c->req->action('default');
33 # default methods receive the controller name as the first argument
34 unshift @{ $c->req->args }, $path if $path;
44 Sebastian Riedel, C<sri@cpan.org>
48 This program is free software, you can redistribute it and/or modify it under
49 the same terms as Perl itself.