X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FChained.pm;fp=lib%2FCatalyst%2FDispatchType%2FChained.pm;h=2ac8c0c261925143b4c29c034ec5764768b24fba;hp=dc9d1a37a88e148fc7735a18327497ee3dd356ef;hb=905679b8b9419c22d08e327cfc36f291b98e59c0;hpb=98d049efac171f40ddcd1553d033f8daf6145e7d diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index dc9d1a3..2ac8c0c 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -247,6 +247,8 @@ sub recurse_match { } my @try_actions = @{$children->{$try_part}}; TRY_ACTION: foreach my $action (@try_actions) { + + if (my $capture_attr = $action->attributes->{CaptureArgs}) { my $capture_count = $action->number_of_captures|| 0; @@ -287,6 +289,8 @@ sub recurse_match { else { { local $c->req->{arguments} = [ @{$c->req->args}, @parts ]; +warn $action; + next TRY_ACTION unless $action->match($c); } my $args_attr = $action->attributes->{Args}->[0]; @@ -298,7 +302,6 @@ sub recurse_match { # OR No parts and this expects 0 # The current best action might also be Args(0), # but we couldn't chose between then anyway so we'll take the last seen - if ( !$best_action || @parts < @{$best_action->{parts}} ||