X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FChildOf.pm;h=171948375dc0ca2ef06ac3a0419a57f3c7594307;hb=cdc97b63a71fdf65cf86be5f8788219751c7b8d5;hp=4be4967afaa65a9213fd0580cc0d0bc195cce430;hpb=792b40acf4b4c3eca61464d33fe5ba8d3a542c44;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/DispatchType/ChildOf.pm b/lib/Catalyst/DispatchType/ChildOf.pm index 4be4967..1719483 100644 --- a/lib/Catalyst/DispatchType/ChildOf.pm +++ b/lib/Catalyst/DispatchType/ChildOf.pm @@ -100,7 +100,8 @@ sub recurse_match { my $children = $self->{children_of}{$parent}; return () unless $children; my @captures; - TRY: foreach my $try_part (sort length, keys %$children) { + TRY: foreach my $try_part (sort { length($a) <=> length($b) } + keys %$children) { my @parts = @$path_parts; if (length $try_part) { # test and strip PathPart next TRY unless