X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=91ae6fc8ddf21671d95203857f78178efc2ad857;hp=b4e3dc2d4ddb1d947a583a0f130334c4fd6fe243;hb=52f71256fa6baba38de781b3074884ff0d12769f;hpb=1faaa3e99565660c7e3cd433e01c80343828f8a8 diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index b4e3dc2..91ae6fc 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -178,6 +178,8 @@ sub go { return 0; } + $action = $self->expand_action($action); + local $c->request->{arguments} = $args; $c->namespace($action->namespace); $c->action($action); @@ -421,6 +423,17 @@ sub uri_for_action { return undef; } +sub expand_action { + my ($self, $action) = @_; + + foreach my $dispatch_type (@{ $self->_dispatch_types }) { + my $expanded = $dispatch_type->expand_action($action); + return $expanded if $expanded; + } + + return $action; +} + =head2 $self->register( $c, $action ) Make sure all required dispatch types for this action are loaded, then