Bug#400921: Config::IniFiles cannot be used against an empty file

Vidar.Loken.Johannessen at virtek.no Vidar.Loken.Johannessen at virtek.no
Tue Apr 8 12:57:09 UTC 2008


Hello,

just a comment when using empty ini files. The function SectionExists is 
not working on empty files. Gets the error message "Can't call method 
"SectionExists" on an undefined value at test.pl line 7." The version is 
still 2.38

the code run is:

#!/usr/bin/perl
use Config::IniFiles;
my $newCfg = new Config::IniFiles( -file => "empty.ini" );
if($newCfg->SectionExists("FILE_IN 123")){
        print "yes\n";
} else {
        print "no\n";
}

Should it be possible to work on empty files with the Config::IniFiles 
module?

Best regards,
Vidar L. Johannessen
System developer and technical support
 
Virtek Communication as
Telephone:   +47 33 03 05 35
Telefax:          +47 33 03 05 31
E-mail:            vidar.loken.johannessen at virtek.no 
Web Site:      www.virtek.no
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20080408/421c6721/attachment.htm 


More information about the pkg-perl-maintainers mailing list