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