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=c0daccd14e8112f722d0248642311122fe3f1070;hp=861d5ef4f9b9f38ace5d5bda957a3c078d614660;hb=2d752b2a8829f424075d4619e9d4edd852adbf46;hpb=e060fe05e8770527de1f433b4ae4bc2cd1e8c303 diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 861d5ef..c0daccd 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -235,13 +235,7 @@ sub get_action { my $name = $c->actions->{compiled}->[$i]->[0]; my $regex = $c->actions->{compiled}->[$i]->[1]; - if ( $action =~ $regex ) { - my @snippets; - for my $i ( 1 .. 9 ) { - no strict 'refs'; - last unless ${$i}; - push @snippets, ${$i}; - } + if ( my @snippets = ( $action =~ $regex ) ) { return [ [ $c->actions->{regex}->{$name}, $name, \@snippets ] ]; }