fixed lurking buglet (thanks to jshirley)
Matt S Trout [Thu, 22 Jun 2006 14:51:05 +0000 (14:51 +0000)]
r10030@cain (orig r4389):  matthewt | 2006-06-15 13:42:29 +0000

lib/Catalyst/DispatchType/ChildOf.pm

index 4be4967..1719483 100644 (file)
@@ -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