From: John Napiorkowski Date: Thu, 4 Apr 2013 13:13:48 +0000 (-0400) Subject: merged X-Git-Tag: 5.90030~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=134c6b5a228aeb79addb52c2323d64b0ed47503a;hp=-c;p=catagits%2FCatalyst-Runtime.git merged --- 134c6b5a228aeb79addb52c2323d64b0ed47503a diff --combined lib/Catalyst/DispatchType/Chained.pm index 4bf8e79,5041442..44f890e --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@@ -212,16 -212,16 +212,16 @@@ sub recurse_match my @try_actions = @{$children->{$try_part}}; TRY_ACTION: foreach my $action (@try_actions) { if (my $capture_attr = $action->attributes->{CaptureArgs}) { - $capture_attr ||= 0; + my $capture_count = $capture_attr->[0] || 0; # Short-circuit if not enough remaining parts - next TRY_ACTION unless @parts >= $capture_attr->[0]; + next TRY_ACTION unless @parts >= $capture_count; my @captures; my @parts = @parts; # localise # strip CaptureArgs into list - push(@captures, splice(@parts, 0, $capture_attr->[0])); + push(@captures, splice(@parts, 0, $capture_count)); # check if the action may fit, depending on a given test by the app if ($action->can('match_captures')) { next TRY_ACTION unless $action->match_captures($c, \@captures) } @@@ -341,7 -341,7 +341,7 @@@ sub register $args = Data::Dumper::Dumper($args); Catalyst::Exception->throw( "Invalid Args($args) for action " . $action->reverse() . - " (use 'Args' or 'Args()'" + " (use 'Args' or 'Args()')" ); } } @@@ -685,11 -685,9 +685,11 @@@ of the endpoint of the chain, not on th C actions will be run before the chain dispatching begins. In every other aspect, C actions behave as documented. -The Cing to other actions does just what you would expect. But if -you C out of a chain, the rest of the chain will not get called -after the C. +The Cing to other actions does just what you would expect. i.e. +only the target action is run. The actions that that action is chained +to are not run. +If you C out of a chain, the rest of the chain will not get +called after the C. =head2 match_captures