From: Matt S Trout Date: Thu, 22 Jun 2006 14:51:05 +0000 (+0000) Subject: fixed lurking buglet (thanks to jshirley) X-Git-Tag: 5.7099_04~498 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=cdc97b63a71fdf65cf86be5f8788219751c7b8d5;hp=2c23b46d57d31a415a6676656ea86d26599af52a fixed lurking buglet (thanks to jshirley) r10030@cain (orig r4389): matthewt | 2006-06-15 13:42:29 +0000 --- 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