X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=lib%2FConfig%2FAny%2FYAML.pm;h=2e800be448993734d248bf385d5deae47fdd99cd;hp=f5d680dddfbd59aa353bdeb11c90f04e63223124;hb=dcfb1d1d1a544d27a82cb174168df23abc539acb;hpb=f0e3c2214342d0d8a8839009b8b9c7e6bfbc7ab2 diff --git a/lib/Config/Any/YAML.pm b/lib/Config/Any/YAML.pm index f5d680d..2e800be 100644 --- a/lib/Config/Any/YAML.pm +++ b/lib/Config/Any/YAML.pm @@ -3,6 +3,8 @@ package Config::Any::YAML; use strict; use warnings; +use base 'Config::Any::Base'; + =head1 NAME Config::Any::YAML - Load YAML config files @@ -41,8 +43,8 @@ sub load { my $class = shift; my $file = shift; - eval { require YAML::Syck; }; - if( $@ ) { + eval { require YAML::Syck; YAML::Syck->VERSION( '0.70' ) }; + if ( $@ ) { require YAML; return YAML::LoadFile( $file ); } @@ -54,17 +56,22 @@ sub load { } } -=head1 AUTHOR +=head2 requires_any_of( ) -=over 4 +Specifies that this modules requires one of L (0.70) or L in +order to work. + +=cut -=item * Brian Cassidy Ebricas@cpan.orgE +sub requires_any_of { [ 'YAML::Syck', '0.70' ], 'YAML' } -=back +=head1 AUTHOR + +Brian Cassidy Ebricas@cpan.orgE =head1 COPYRIGHT AND LICENSE -Copyright 2006 by Brian Cassidy +Copyright 2007 by Brian Cassidy This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.