Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: SAPER [...] cpan.org
Cc:
AdminCc:

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



Subject: [patch] Remove inline comments from values
Hello, Config::Simple is incorrectly including comments on the same line as a parameter definition in the parameter value. For example, I was trying to read a php.ini that contains lines like: max_execution_time = 30 ; Maximum execution time of each script Config::Simple puts the value "30 ; Maximum execution time of each script" for max_execution_time, instead of just "30". The attached patch fixes this. -- Close the world, txEn eht nepO.
Subject: Config-Simple-4.58-inline-comments.patch
--- Simple.pm.orig 2006-02-02 11:35:05.307416126 +0100 +++ Simple.pm 2006-02-02 11:40:47.423067942 +0100 @@ -283,6 +283,7 @@ $line =~ s/^\s+//g; $line =~ s/\s+$//g; + $line =~ s/\s*[#;].*$//; # remove inline comments # parsing the block name: $line =~ /^\s*\[\s*([^\]]+)\s*\]$/ and $bn = lcase($1), next;