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=b236aa433993e2b6649f9fe9cb969389edb95c92;hp=32b2c3b24dce3fdb2d292049cb49b3d41e6173ca;hb=1b04b972e18d9681ab30d07a267bb2896ea9f7d2;hpb=b7ce908fc5c404dcbc480c7ecf9a275b92fcc26f diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index 32b2c3b..b236aa4 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -115,8 +115,9 @@ sub recurse_match { my $children = $self->{children_of}{$parent}; return () unless $children; my @captures; - TRY: foreach my $try_part (sort { length($a) <=> length($b) } + TRY: foreach my $try_part (sort { length($b) <=> length($a) } keys %$children) { + # $b then $a to try longest part first my @parts = @$path_parts; if (length $try_part) { # test and strip PathPart next TRY unless