moved component name sort that happens in setup_components to locate_components to...
Luke Saunders [Wed, 4 Aug 2010 14:25:18 +0000 (14:25 +0000)]
lib/Catalyst.pm

index 02c8b71..07a8c16 100644 (file)
@@ -2407,8 +2407,7 @@ sub setup_components {
 
     my $config  = $class->config->{ setup_components };
 
-    my @comps = sort { length $a <=> length $b }
-                $class->locate_components($config);
+    my @comps = $class->locate_components($config);
     my %comps = map { $_ => 1 } @comps;
 
     my $deprecatedcatalyst_component_names = grep { /::[CMV]::/ } @comps;
@@ -2463,7 +2462,8 @@ sub locate_components {
         %$config
     );
 
-    my @comps = $locator->plugins;
+    # XXX think about ditching this sort entirely
+    my @comps = sort { length $a <=> length $b } $locator->plugins;
 
     return @comps;
 }