Subject: | Array handling regression when using equals format |
There appears to be a regression in the newer versions of Config::Auto
related to the handling of multiple values. We are seeing this behavior
on multiple versions of FreeBSD, including 8.2-RELEASE and 9.0-CURRENT,
multiple versions of Perl, 5.14.1, 5.10.1, and 5.8.9, and multiple
versions of Config::Auto. Versions 0.34 and 0.36 appear to be broken,
but we have found that 0.30 works. In all cases, Perl and Config::Auto
are pulled in from FreeBSD ports.
To demonstrate this behavior, I have used the following config file and
perl script.
==Config File==
# A list of defined backup jobs
backup.jobs.list = production development infrastructure
jaguararray
foo = bar
== End Config==
==Test Script==
#!/usr/local/bin/perl
use strict;
use warnings;
use Config::Auto;
use Data::Dumper;
# Source the config file. This line must be changed if the config file
# is named differently.
my $ca = Config::Auto->new(
source => "/tmp/test.conf",
format => "equal"
);
my $config = $ca->parse;
print Dumper($config);
==End Script==
The following output is produced by running this script on a machine
running FreeBSD 8.2-RELEASE, Perl 5.10.1, and Config::Auto 0.30.
==Working Output
$VAR1 = {
'backup.jobs.list' => [
'production',
'development',
'infrastructure',
'jaguararray'
],
'foo' => 'bar'
};
==End Working Output==
The following is an example of the incorrect output generated on a
different machine running FreeBSD 9.0-CURRENT, Perl 5.12.3, and
Config::Auto 0.36. Reverting Config::Auto to 0.30 on this machine yields
the above results.
==Broken Output==
$VAR1 = {
'foo' => 'bar'
};
==End Broken Output==