Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: rohan [...] digins.net.au
Cc:
AdminCc:

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



Subject: Config::IniFiles with handle_trailing_comment doesn't parse trailing comments correctly
Date: Tue, 16 Jun 2015 07:59:30 +0000
To: "bug-Config-IniFiles [...] rt.cpan.org" <bug-Config-IniFiles [...] rt.cpan.org>
From: Rohan Carly <rohan [...] digins.net.au>
Download (untitled) / with headers
text/plain 805b
Dear maintainer, When I insert a comment containing a semicolon into an INI file, I was surprised to see only half of it being treated as a comment, with the reset being treated as part of the parameter value. Here is my test code: #!/usr/bin/env perl use Config::IniFiles; use warnings; my $ini_file_contents = "[abc]\ndog=cat ; a comment ; further comment"; my $c = Config::IniFiles->new( -file=>\$ini_file_contents, -handle_trailing_comment=>1 ); print $c->val("abc","dog")."\n”; Expected output: cat Actual output: cat ; a comment I tried this with version 2.86. I was hoping that you might be able to correct this behaviour. I note that some other INI file parsers, such as crudini (command line util), provide the result I expect. Thanks, -- Rohan Carly
Download (untitled) / with headers
text/plain 999b
On Tue Jun 16 03:59:50 2015, rohan@digins.net.au wrote: Show quoted text
> Dear maintainer, > > When I insert a comment containing a semicolon into an INI file, I was > surprised to see only half of it being treated as a comment, with the > reset being treated as part of the parameter value. > > Here is my test code: > > #!/usr/bin/env perl > use Config::IniFiles; > use warnings; > my $ini_file_contents = "[abc]\ndog=cat ; a comment ; further > comment"; > my $c = Config::IniFiles->new( > -file=>\$ini_file_contents, > -handle_trailing_comment=>1 > ); > print $c->val("abc","dog")."\n”; > > Expected output: cat > Actual output: cat ; a comment > > I tried this with version 2.86. > > I was hoping that you might be able to correct this behaviour. I note > that some other INI file parsers, such as crudini (command line util), > provide the result I expect. >
Hi Rohan, thanks for the report. I'll investigate and try to fix it. Regards, -- Shlomi Fish Show quoted text
> Thanks, > -- > Rohan Carly > >
Download (untitled) / with headers
text/plain 1.4k
Hi Rohan, thanks for the report again. I investigated and fixed the problem in Config-IniFiles-2.87 which I just uploaded to CPAN. You may opt to visit my home site on the Web - http://www.shlomifish.org/ and see how to help it - http://www.shlomifish.org/meta/how-to-help/ . Thanks again! Marking as RESOLVED. Regards, -- Shlomi Fish On Tue Jun 16 04:21:21 2015, SHLOMIF wrote: Show quoted text
> On Tue Jun 16 03:59:50 2015, rohan@digins.net.au wrote:
> > Dear maintainer, > > > > When I insert a comment containing a semicolon into an INI file, I was > > surprised to see only half of it being treated as a comment, with the > > reset being treated as part of the parameter value. > > > > Here is my test code: > > > > #!/usr/bin/env perl > > use Config::IniFiles; > > use warnings; > > my $ini_file_contents = "[abc]\ndog=cat ; a comment ; further > > comment"; > > my $c = Config::IniFiles->new( > > -file=>\$ini_file_contents, > > -handle_trailing_comment=>1 > > ); > > print $c->val("abc","dog")."\n”; > > > > Expected output: cat > > Actual output: cat ; a comment > > > > I tried this with version 2.86. > > > > I was hoping that you might be able to correct this behaviour. I note > > that some other INI file parsers, such as crudini (command line util), > > provide the result I expect. > >
> > Hi Rohan, > > thanks for the report. I'll investigate and try to fix it. > > Regards, > > -- Shlomi Fish >
> > Thanks, > > -- > > Rohan Carly > > > >
> >
Subject: Re: [rt.cpan.org #105255] Config::IniFiles with handle_trailing_comment doesn't parse trailing comments correctly
Date: Tue, 16 Jun 2015 12:26:33 +0000
To: "bug-Config-IniFiles [...] rt.cpan.org" <bug-Config-IniFiles [...] rt.cpan.org>
From: Rohan Carly <rohan [...] digins.net.au>
Download (untitled) / with headers
text/plain 1.7k
Hi Shlomi Fish, great work. I tested it and it looks good now. With appreciation, Rohan. On 16/06/2015 5:13 pm, "Shlomi Fish via RT" <bug-Config-IniFiles@rt.cpan.org<mailto:bug-Config-IniFiles@rt.cpan.org>> wrote: <URL: https://rt.cpan.org/Ticket/Display.html?id=105255 > Hi Rohan, thanks for the report again. I investigated and fixed the problem in Config-IniFiles-2.87 which I just uploaded to CPAN. You may opt to visit my home site on the Web - http://www.shlomifish.org/ and see how to help it - http://www.shlomifish.org/meta/how-to-help/ . Thanks again! Marking as RESOLVED. Regards, -- Shlomi Fish On Tue Jun 16 04:21:21 2015, SHLOMIF wrote: On Tue Jun 16 03:59:50 2015, rohan@digins.net.au<mailto:rohan@digins.net.au> wrote: Show quoted text
> Dear maintainer, > > When I insert a comment containing a semicolon into an INI file, I was > surprised to see only half of it being treated as a comment, with the > reset being treated as part of the parameter value. > > Here is my test code: > > #!/usr/bin/env perl > use Config::IniFiles; > use warnings; > my $ini_file_contents = "[abc]\ndog=cat ; a comment ; further > comment"; > my $c = Config::IniFiles->new( > -file=>\$ini_file_contents, > -handle_trailing_comment=>1 > ); > print $c->val("abc","dog")."\n”; > > Expected output: cat > Actual output: cat ; a comment > > I tried this with version 2.86. > > I was hoping that you might be able to correct this behaviour. I note > that some other INI file parsers, such as crudini (command line util), > provide the result I expect. >
Hi Rohan, thanks for the report. I'll investigate and try to fix it. Regards, -- Shlomi Fish Show quoted text
> Thanks, > -- > Rohan Carly > >
-- Rohan Carly Digital Inscription Office: (08) 6102 6247 Mobile: 0419 041 246
Download (untitled) / with headers
text/plain 329b
Hi Rohan, On Tue Jun 16 08:26:54 2015, rohan@digins.net.au wrote: Show quoted text
> Hi Shlomi Fish, great work. > > I tested it and it looks good now. > > With appreciation, >
You're welcome. Thanks for the report! I also saw you sent me some money using PayPal - this is also appreciated. Thanks! ♥! Regards, -- Shlomi Fish Show quoted text
> Rohan.


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.