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=310b772f7fb2b6270db3ec296f721db853bb0856;hp=e29e5b5916d4fdaa1b26cba8390cca4786f49bcd;hb=219b4f88f35201393e0e84ec478f9aee542339b9;hpb=67b8d82923e00a64e872a93685e0e19d41168451 diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index e29e5b5..310b772 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -286,9 +286,15 @@ sub recurse_match { # 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 || + if ( + !$best_action || @parts < @{$best_action->{parts}} || - (!@parts && defined($args_attr) && $args_attr eq "0")){ + ( + !@parts && + defined($args_attr) && + $args_attr eq "0" + ) + ){ $best_action = { actions => [ $action ], captures=> [],