X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FChained.pm;h=fcdc49e2aea89167a800cb15f63ffa17b8644f66;hb=84ac8ab9654b24185dcedafa1e1d292c8be2c6fb;hp=ede2b69f5195ca96657a4065553e495e8063d868;hpb=22faeff5f7d88f6f9c4cd73077e9428651cd8713;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index ede2b69..fcdc49e 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -360,7 +360,7 @@ sub uri_for_action { my $curr = $action; while ($curr) { if (my $cap = $curr->attributes->{CaptureArgs}) { - return undef unless @captures >= $cap->[0]; # not enough captures + return undef unless @captures >= ($cap->[0]||0); # not enough captures if ($cap->[0]) { unshift(@parts, splice(@captures, -$cap->[0])); }