From: Rafael Kitover Date: Mon, 2 Aug 2010 10:39:25 +0000 (+0000) Subject: require Config::General >= 2.47 X-Git-Tag: v0.20~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e3c5f84b28bcbbf9b2c7dadde2c3278d72fa6ae4;p=p5sagit%2FConfig-Any.git require Config::General >= 2.47 --- diff --git a/Makefile.PL b/Makefile.PL index ada29a7..31e2146 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -11,8 +11,18 @@ all_from 'lib/Config/Any.pm'; 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; diff --git a/lib/Config/Any/General.pm b/lib/Config/Any/General.pm index 936bb44..74776e2 100644 --- a/lib/Config/Any/General.pm +++ b/lib/Config/Any/General.pm @@ -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 };