require Config::General >= 2.47
[p5sagit/Config-Any.git] / lib / Config / Any / General.pm
index 936bb44..74776e2 100644 (file)
@@ -50,9 +50,14 @@ sub load {
 
     $args->{ -ConfigFile } = $file;
 
+    require Config::General;
+
+    if (Config::General->VERSION < 2.47) {
+        die "Config::General version 2.47 or greater required";
+    }
+
     $args->{ -ForceArray } = 1 unless exists $args->{ -ForceArray };
 
-    require Config::General;
     my $configfile = Config::General->new( %$args );
     my $config     = { $configfile->getall };