-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear Mr. Ruzmetov,
I am the maintainer for the Debian packaging of your Config::Simple CPAN module. I wanted to ask you about the behavior of Config::Simple->import_from() when the config file being loaded has keys with empty values. [EMAIL PROTECTED]:~/debian/maint/libconfig-simple-perl/365190$ cat test.pl #!/usr/bin/perl use Config::Simple; my %config = (); Config::Simple->import_from('test.ini', \%config); foreach $key (sort keys %config) { print "$key = $config{$key}\n"; } [EMAIL PROTECTED]:~/debian/maint/libconfig-simple-perl/365190$ cat test.ini parm1 = 1 parm2 = parm3 = 3 [EMAIL PROTECTED]:~/debian/maint/libconfig-simple-perl/365190$ ./test.pl default.parm1 = 1 default.parm2 = ARRAY(0x821b624) default.parm3 = 3 The problem appears to be in get_param(), where $rv is defined, but doesn't point to anything. The attached patch solved the problem I was having with import_from(), but I'm not sure whether or not it may cause problems for other methods. (I'm still trying to grok exactly what all is happening in get_param().) Any guidance you can provide would be appreciated. By the way, this is with version 4.58. Thank you, tony mancill -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE3BVLpdwBkPlyvgMRAoihAJ0S7YqNINPToIpS/AbTbteMt4wUxQCcDPFT MA3hTf9jNPSc8LbHwtlU2N8= =nHsM -----END PGP SIGNATURE-----
--- libconfig-simple-perl-4.58.orig/Simple.pm +++ libconfig-simple-perl-4.58/Simple.pm @@ -469,8 +469,7 @@ } else { $rv = $self->{_DATA}->{$arg}; } - - defined($rv) or return; + defined($rv->[0]) or return; for ( my $i=0; $i < @$rv; $i++ ) { $rv->[$i] =~ s/\\n/\n/g;