Revision history for Config-Any
+ - enable -ForceArray option by default for Config::General (caelum)
+
0.19 Mon 15 Feb 2010
- add JSON::DWIW to the top of the JSON loaders list (caelum)
- remove need for caching in Perl loader by using do() instead
name = TestApp
<Component Controller::Foo>
foo bar
+ bar [ arrayref-value ]
</Component>
<Model Baz>
qux xyzzy
$args->{ -ConfigFile } = $file;
+ $args->{ -ForceArray } = 1 unless exists $args->{ -ForceArray };
+
require Config::General;
my $configfile = Config::General->new( %$args );
my $config = { $configfile->getall };
plan skip_all => 'Config::General format not supported';
}
else {
- plan tests => 6;
+ plan tests => 7;
}
{
ok( exists $config->{ component } );
}
+{
+ my $config = Config::Any::General->load(
+ 't/conf/single_element_arrayref.conf'
+ );
+ is_deeply $config->{foo}, [ 'bar' ],
+ 'single element arrayref';
+}
+
# test invalid config
{
my $file = 't/invalid/conf.conf';
--- /dev/null
+foo [ bar ]