Skip Menu |
 

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

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

People
Owner: SHLOMIF [...] cpan.org
Requestors: mguttman4 [...] gmail.com
Cc:
AdminCc:

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



Subject: [59152] UTF-8 (and other Unicode encodings?) BOM cause the package to fail
Date: Sat, 9 Jan 2016 12:40:31 +0200
To: bug-Config-IniFiles [...] rt.cpan.org, Shlomi Fish <shlomif [...] shlomifish.org>
From: Meir Guttman <mguttman4 [...] gmail.com>
On a private exchange with Shlomi Fish, the prodigious maintainer of this and 100+ more packages, he challenged me to reopen this issue. (To my defense I can tell you that as long as I kept my INI files BOM-free, I had no trouble whatsoever using this module. In fact, no application of mine is without it!) OK, I tried his test program as well as my own small test program, and all indeed tolerated the BOM without failure.But still, my application didn't! Then I took one of my apps and started to trim it from below. It failed all the way up, until the very act of calling the package's 'new' method: *my $node_cfg = Config::IniFiles->new( -file => $node_ini_fn) or do { my $err_message = join("\n", @Config::IniFiles::errors); die "Node INI file problems: $err_message\n";};my $node_root = $node_cfg->val('general','node_root');say "Node root: ", $node_root;* Then it worked!!! The very same code that failed was now working! Puzzling! How come that code *after* opening and reading the file was causing a reading error??? Can anyone suggest a way to pin down the source of this? Regards Meir
Download (untitled) / with headers
text/plain 1.4k
Hi Meir, a few notes: 1. You opened a completely different and new issue here. 2. Your code is hard to read and follow. Can you please go to the web-interface and attach the relevant files? Regards, -- Shlomi Fish On Sat Jan 09 05:40:43 2016, mguttman4@gmail.com wrote: Show quoted text
> On a private exchange with Shlomi Fish, the prodigious maintainer of this > and 100+ more packages, he challenged me to reopen this issue. (To my > defense I can tell you that as long as I kept my INI files BOM-free, I had > no trouble whatsoever using this module. In fact, no application of mine is > without it!) > > OK, I tried his test program as well as my own small test program, and all > indeed tolerated the BOM without failure.But still, my application didn't! > > Then I took one of my apps and started to trim it from below. It failed all > the way up, until the very act of calling the package's 'new' method: > > > > > > > > > > *my $node_cfg = Config::IniFiles->new( -file => $node_ini_fn) or do { my > $err_message = join("\n", @Config::IniFiles::errors); die "Node INI file > problems: $err_message\n";};my $node_root = > $node_cfg->val('general','node_root');say "Node root: ", $node_root;* > Then it worked!!! The very same code that failed was now working! > Puzzling! How come that code *after* opening and reading the file was > causing a reading error??? > > Can anyone suggest a way to pin down the source of this? > > Regards > Meir
Download (untitled) / with headers
text/plain 383b
On Sat Jan 09 07:21:14 2016, SHLOMIF wrote: Show quoted text
> Hi Meir, > > a few notes: > > 1. You opened a completely different and new issue here. > > 2. Your code is hard to read and follow. Can you please go to the web- > interface and attach the relevant files? > > Regards, > > -- Shlomi Fish
This is a duplicate of https://rt.cpan.org/Ticket/Display.html?id=59152 - more comments there.


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.