X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=lib%2FConfig%2FAny%2FGeneral.pm;h=d16cf595cf8753e6fe7ead2de3663601bbcfd9b1;hp=0b39af2f58c79960f86bcec3895fdf06865b6d7e;hb=82222eccd9a0ff010db060d9cc4e11bbed9ee924;hpb=92a04e78451078b33f75e7c44d247b024c27b4f7 diff --git a/lib/Config/Any/General.pm b/lib/Config/Any/General.pm index 0b39af2..d16cf59 100644 --- a/lib/Config/Any/General.pm +++ b/lib/Config/Any/General.pm @@ -2,6 +2,9 @@ package Config::Any::General; use strict; use warnings; +use Carp; + +use base 'Config::Any::Base'; =head1 NAME @@ -14,6 +17,7 @@ Loads Config::General files. Example: name = TestApp foo bar + bar [ arrayref-value ] qux xyzzy @@ -48,6 +52,12 @@ sub load { $args->{ -ConfigFile } = $file; require Config::General; + + croak "Config::General 2.47 or later required" + unless Config::General->VERSION('2.47'); + + $args->{ -ForceArray } = 1 unless exists $args->{ -ForceArray }; + my $configfile = Config::General->new( %$args ); my $config = { $configfile->getall }; @@ -68,25 +78,25 @@ sub _test_perl { return defined $is_perl_src; } -=head1 AUTHOR +=head2 requires_all_of( ) -=over 4 +Specifies that this module requires L in order to work. -=item * Brian Cassidy Ebricas@cpan.orgE +=cut -=back +sub requires_all_of { [ 'Config::General' ] } -=head1 CONTRIBUTORS +=head1 AUTHOR -=over 4 +Brian Cassidy Ebricas@cpan.orgE -=item * Joel Bernstein C<< >> +=head1 CONTRIBUTORS -=back +Joel Bernstein C<< >> =head1 COPYRIGHT AND LICENSE -Copyright 2006 by Brian Cassidy +Copyright 2006-2010 by Brian Cassidy Portions Copyright 2006 Portugal Telecom