Skip Menu |

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

Report information
The Basics
Id: 49682
Status: new
Priority: 0/
Queue: Config-Simple

People
Owner: Nobody in particular
Requestors: tmancill [...] debian.org
Cc:
AdminCc:

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



Subject: Config::Simple has some issues when parsing Ini-files.
Date: Sun, 13 Sep 2009 20:29:33 -0700
To: bug-Config-Simple [...] rt.cpan.org
From: tony mancill <tmancill [...] debian.org>
(The following is a bug report submitted by Stefan Denker via the Debian bug tracking system: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546534) -- This File: [colors] average (2009) = blue leads to the error message: Something went wrong. No supported configuration file syntax found. Either the file is of wrong syntax, or there is a bug in guess_syntax() method. at /usr/share/perl5/Config/Simple.pm line 184, <FH> line 2. I've played around a bit with this line and the closing paranthesis seems to be the problem. In fact, string that ends with a non-word-character makes Config::Simple choke. So average (2009 = blue average (2009)a = blue both are correct. The error message is misleading, to me the culprit seems to be line 290: $line =~ /^\s*([^=]*\w)\s*=\s*(.*)\s*$/ and $data{$bn}->{lcase($1)}=[parse_line(READ_DELIM, 0, $2)], next; I'd suggest changing the regexp to /^\s*([^=]+)\s*=\s*(.*)\s*$/ but haven't had time to test this change, hence no patch attached. :) Stefan -- System Information: Debian Release: 5.0.3 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libconfig-simple-perl depends on: ii perl 5.10.0-19lenny2 Larry Wall's Practical Extraction libconfig-simple-perl recommends no packages. libconfig-simple-perl suggests no packages. -- no debconf information