Skip Menu |

This queue is for tickets about the Config-General CPAN distribution.

Report information
The Basics
Id: 77667
Status: resolved
Priority: 0/
Queue: Config-General

People
Owner: tlinden [...] cpan.org
Requestors: peter [...] pjsc.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.50
Fixed in: (no value)



Subject: can not read hash stored with save_file
For a test program I store a hash with save_file and can not read this file in the tested program. The / in front of the hash subkey is causing problems. Writing the configfile manually ( <source /tmp/test/in> ) is ok. Following structure is causing problems my %conf = ( level => 1, source => { "/tmp/test/in" => { target => "/out", } } ); I write the hash out to file testhash: my $conf_obj = new Config::General ( -DefaultConfig => \%Default, -MergeDuplicateOptions => "no", -AllowMultiOptions => "yes", -LowerCaseNames => "yes", -AutoTrue => "yes", ); $conf_obj->save_file("testhash",\%conf); And try to load it in another hash $conf_obj = new Config::General ( -DefaultConfig => \%Default, -MergeDuplicateOptions => "no", -ConfigFile => "testhash", -AllowMultiOptions => "yes", -LowerCaseNames => "yes", -AutoTrue => "yes", ); my %p = $conf_obj->getall(); which throws following error: Config::General: EndBlock "<//tmp/test/in>" has no StartBlock statement (level: 1, chunk 4)! at config-general line 22 at /home/perlcomp/perl5/lib/perl5/Config/General.pm line 828 This is the created config file testhash: <source> </tmp/test/in> target /out <//tmp/test/in> </source> level 1 System: AIX perl5 (revision 5 version 8 subversion 8) Distribution Config-General-2.50 some problem on Ubuntu Linux
fixed in 2.51.