Skip Menu |
 

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

Report information
The Basics
Id: 9665
Status: resolved
Priority: 0/
Queue: Config-IniFiles

People
Owner: Nobody in particular
Requestors: jeremy.norris [...] linspireinc.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 2.38
Fixed in: (no value)

Attachments
fix_uninitialized_value_in_sub_line_614.diff



Subject: Does not handle opening empty ini files very gracefully.
Download (untitled) / with headers
text/plain 328b
Just a quick note to inform you that $Config::IniFiles::VERSION = (qw($Revision: 2.38 $)) does not handle opening empty ini files very gracefully. This results in a couple of uninitialized value warnings instead of a clean error condition. This is not a severe problem, just something I thought you would like to be aware of.
From: DON [...] cpan.org
The attached diff resolves this issue which I was annoyed with recently.
--- /usr/share/perl5/Config/IniFiles.pm~ 2005-04-29 12:38:56.000000000 -0700 +++ /usr/share/perl5/Config/IniFiles.pm 2006-07-28 15:00:05.000000000 -0700 @@ -611,7 +611,7 @@ # If there's a UTF BOM (Byte-Order-Mark) in the first character of the first line # then remove it before processing (http://www.unicode.org/unicode/faq/utf_bom.html#22) - ($lines[0] =~ s/^//); + ($lines[0] =~ s/^//) if @lines; # Disabled the utf8 one for now (JW) because it doesn't work on all perl distros # e.g. 5.6.1 works with or w/o 'use utf8' 5.6.0 fails w/o it. 5.005_03 # says "invalid hex value", etc. If anyone has a clue how to make this work
Resolving as OLD because I can no longer find that code.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.