| Config-Any documentation | Contained in the Config-Any distribution. |
Config::Any::General - Load Config::General files
Loads Config::General files. Example:
name = TestApp
<Component Controller::Foo>
foo bar
bar [ arrayref-value ]
</Component>
<Model Baz>
qux xyzzy
</Model>
return an array of valid extensions (cnf, conf).
Attempts to load $file via Config::General.
Specifies that this module requires Config::General in order to work.
Brian Cassidy <bricas@cpan.org>
Joel Bernstein <rataxis@cpan.org>
Copyright 2006-2011 by Brian Cassidy
Portions Copyright 2006 Portugal Telecom
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Config-Any documentation | Contained in the Config-Any distribution. |
package Config::Any::General; use strict; use warnings; use base 'Config::Any::Base';
sub extensions { return qw( cnf conf ); }
sub load { my $class = shift; my $file = shift; my $args = shift || {}; $args->{ -ConfigFile } = $file; require Config::General; Config::General->VERSION( '2.47' ); $args->{ -ForceArray } = 1 unless exists $args->{ -ForceArray }; my $configfile = Config::General->new( %$args ); my $config = { $configfile->getall }; return $config; }
sub requires_all_of { [ 'Config::General' ] }
1;