ensure require() happens against plugin specified in force_plugins
[p5sagit/Config-Any.git] / lib / Config / Any.pm
index 16dcd1b..8699b55 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use Carp;
 use Module::Pluggable::Object ();
 
-our $VERSION = '0.16';
+our $VERSION = '0.17';
 
 =head1 NAME
 
@@ -142,7 +142,9 @@ sub _load {
     }
 
     # figure out what plugins we're using
-    my @plugins = $force ? @{ $args->{ force_plugins } } : $class->plugins;
+    my @plugins = $force
+        ? map { eval "require $_;"; $_; } @{ $args->{ force_plugins } }
+        : $class->plugins;
 
     # map extensions if we have to
     my ( %extension_lut, $extension_re );
@@ -281,7 +283,7 @@ parameter to those methods.
 sub extensions {
     my $class = shift;
     my @ext
-        = map { $_->extensions } grep { $_->is_supported } $class->plugins;
+        = map { $_->extensions } $class->plugins;
     return wantarray ? @ext : \@ext;
 }