[Catalyst-commits] r7129 - trunk/Config-Any/lib/Config

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Tue Nov 13 18:19:08 GMT 2007


Author: bricas
Date: 2007-11-13 18:19:08 +0000 (Tue, 13 Nov 2007)
New Revision: 7129

Modified:
   trunk/Config-Any/lib/Config/Any.pm
Log:
only check if a plugin is supported once we're sure we want to use it. this will save us from loading modules we don't need to.

Modified: trunk/Config-Any/lib/Config/Any.pm
===================================================================
--- trunk/Config-Any/lib/Config/Any.pm	2007-11-13 18:10:57 UTC (rev 7128)
+++ trunk/Config-Any/lib/Config/Any.pm	2007-11-13 18:19:08 UTC (rev 7129)
@@ -141,8 +141,7 @@
     }
 
     # figure out what plugins we're using
-    my @plugins = grep { $_->is_supported }
-        ( $force ? @{ $args->{ force_plugins } } : $class->plugins );
+    my @plugins = $force ? @{ $args->{ force_plugins } } : $class->plugins;
 
     # map extensions if we have to
     my ( %extension_lut, $extension_re );
@@ -179,6 +178,7 @@
         }
 
         for my $loader ( @try_plugins ) {
+            next unless $loader->is_supported;
             my @configs
                 = eval { $loader->load( $filename, $loader_args{ $loader } ); };
 




More information about the Catalyst-commits mailing list