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;h=ba488df0e3a34bdd15f837e22e92fb483c940b63;hp=94a8a4c3c37af5e8d738e90b5f17ad8e3afca991;hb=5e2186c55ff39ff02307a276806f7fd47c13f8d2;hpb=b0ad47c12a21862b08d8e2942095065ac2f7edf2 diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index 94a8a4c..ba488df 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -233,7 +233,10 @@ sub recurse_match { local $c->req->{arguments} = [ @{$c->req->args}, @parts ]; next TRY_ACTION unless $action->match($c); } + + # Default args is blank, not 0, since Args() my $args_attr = $action->attributes->{Args}->[0]; + $args_attr = '' unless defined $args_attr; # No best action currently # OR This one matches with fewer parts left than the current best action, @@ -353,9 +356,7 @@ sub uri_for_action { if (my $cap = $curr->attributes->{CaptureArgs}) { return undef unless @captures >= $cap->[0]; # not enough captures if ($cap->[0]) { - unshift(@parts, - map { s/([^A-Za-z0-9\-_.!~*'()])/$URI::Escape::escapes{$1}/go; $_; } - splice(@captures, -$cap->[0])); + unshift(@parts, splice(@captures, -$cap->[0])); } } if (my $pp = $curr->attributes->{PartPath}) {