1 package Config::Any::YAML;
8 Config::Any::YAML - Load YAML config files
12 Loads YAML files. Example:
26 return an array of valid extensions (C<yml>, C<yaml>).
31 return qw( yml yaml );
36 Attempts to load C<$file> as a YAML file.
44 eval { require YAML::Syck; };
47 return YAML::LoadFile( $file );
50 open( my $fh, $file ) or die $!;
51 my $content = do { local $/; <$fh> };
53 return YAML::Syck::Load( $content );
59 Brian Cassidy E<lt>bricas@cpan.orgE<gt>
61 =head1 COPYRIGHT AND LICENSE
63 Copyright 2007 by Brian Cassidy
65 This library is free software; you can redistribute it and/or modify
66 it under the same terms as Perl itself.
74 =item * L<Config::Any>