[Catalyst-commits] r13462 - in trunk/Config-Any: . lib/Config/Any

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Mon Aug 2 10:39:25 GMT 2010


Author: caelum
Date: 2010-08-02 10:39:25 +0000 (Mon, 02 Aug 2010)
New Revision: 13462

Modified:
   trunk/Config-Any/Makefile.PL
   trunk/Config-Any/lib/Config/Any/General.pm
Log:
require Config::General >= 2.47

Modified: trunk/Config-Any/Makefile.PL
===================================================================
--- trunk/Config-Any/Makefile.PL	2010-08-02 10:00:37 UTC (rev 13461)
+++ trunk/Config-Any/Makefile.PL	2010-08-02 10:39:25 UTC (rev 13462)
@@ -11,8 +11,18 @@
 
 requires 'Module::Pluggable' => '3.01';
 
+if (can_use('Config::General') && !can_use('Config::General', '2.47')) {
+    requires 'Config::General' => '2.47';
+}
+
 test_requires 'Test::More';
 
+if ($Module::Install::AUTHOR) {
+    Meta->{values}{requires} = [ grep {
+        $_->[0] ne 'Config::General'
+    } @{ Meta->{values}{requires} } ];
+}
+
 resources repository => 'http://dev.catalyst.perl.org/repos/Catalyst/trunk/Config-Any/';
 
 WriteAll;

Modified: trunk/Config-Any/lib/Config/Any/General.pm
===================================================================
--- trunk/Config-Any/lib/Config/Any/General.pm	2010-08-02 10:00:37 UTC (rev 13461)
+++ trunk/Config-Any/lib/Config/Any/General.pm	2010-08-02 10:39:25 UTC (rev 13462)
@@ -50,9 +50,14 @@
 
     $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 };
 




More information about the Catalyst-commits mailing list