fixed sort order bug
Matt S Trout [Thu, 22 Jun 2006 14:53:42 +0000 (14:53 +0000)]
r10153@cain (orig r4431):  matthewt | 2006-06-21 19:09:04 +0000

lib/Catalyst/DispatchType/Chained.pm

index 32b2c3b..b236aa4 100644 (file)
@@ -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