Skip Menu |

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

Report information
The Basics
Id: 18701
Status: resolved
Priority: 0/
Queue: Config-Std

People
Owner: Nobody in particular
Requestors: william [...] knowmad.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: v0.0.4



Subject: Support for ini-style comments
Damian, Any chance of your library supporting ini-style comments? This would make syntax coloring in my text editor much happier! Thanks, William
Subject: Re: [rt.cpan.org #18701] Support for ini-style comments
Date: Fri, 14 Apr 2006 18:02:40 +1000
To: bug-Config-Std [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi William, Show quoted text
> Any chance of your library supporting ini-style comments? This would > make syntax coloring in my text editor much happier!
Every chance. I'm embarrassed that the module didn't already do so. Give the attached beta (and updated test file) a try and see if you're happier with it. All the best, and thanks for the suggestion, Damian

Message body is not shown because it is too large.

use Config::Std; use Test::More 'no_plan'; my $data = q{ # A comment foo: bar # Not a trailing comment. This is data for the 'foo' config var ; Another comment baz: qux ; Not a trailing comment. This is data for the 'qux' config var }; # Read in the config file from Example 19-3... read_config \$data => my %config; write_config %config, \$results; is $results, $data => "Comments preserved on simple round-trip"; $config{""}{foo} = 'baz'; $config{""}{baz} = 'foo'; $data =~ s/bar.*/baz/; $data =~ s/qux.*/foo/; write_config %config, \$results; is $results, $data => "Comments preserved on mutating round-trip";
Subject: Re: [rt.cpan.org #18701] Support for ini-style comments
Date: Fri, 14 Apr 2006 13:29:57 -0400
To: "damian [...] conway.org via RT" <bug-Config-Std [...] rt.cpan.org>
From: William McKee <william [...] knowmad.com>
On Fri, Apr 14, 2006 at 04:03:35AM -0400, damian@conway.org via RT wrote: Show quoted text
> Every chance. I'm embarrassed that the module didn't already do so. > Give the attached beta (and updated test file) a try and see if you're happier > with it.
Thanks! Initial tests show that it appears working fine for us. I'll let you know if anything changes. William -- Knowmad Technologies http://www.knowmad.com
Show quoted text
> Thanks! Initial tests show that it appears working fine for us. I'll > let you know if anything changes.
Hi Damian, Well it looks like there are some issues with this release. I dropped it into place for another project and started to receive the following errors when trying to use the write_config function from my Build.PL: ---------------- Operator or semicolon missing before %config at Build.PL line 213. Ambiguous use of % resolved as operator % at Build.PL line 213. Bareword "write_config" not allowed while "strict subs" in use at Build.PL line 213. Bareword "config" not allowed while "strict subs" in use at Build.PL line 213. Execution of Build.PL aborted due to compilation errors. ---------------- These errors do not occur with v0.0.4. For further testing, I dropped the v0.0.8 into the distribution and ran the testsuite against it (via ./Build test). Seems there are several errors cropping up which I suppose is why you have not released this version into the wild yet. I wonder if this is a Module::Build issue as my previous usage was from a CGI script which worked fine. I am running M::B v0.2611. Let me know if I can provide further information. Thanks, William
Hello, Boston.pm and I are taking primary maintainer role from Damian. Are you ok with the 0.0.7 version? If not, is it 'strict' that is triggering issue? I see that a patch that will make it ok with strict was submitted and not applied. That will be on my list. Meantime, may need use before strict or in no strict scope. Bill Boston.pm On Thu May 04 05:46:43 2006, guest wrote: Show quoted text
> > Thanks! Initial tests show that it appears working fine for us. I'll > > let you know if anything changes.
> > Hi Damian, > > Well it looks like there are some issues with this release. I dropped it > into place for another project and started to receive the following > errors when trying to use the write_config function from my Build.PL: > > ---------------- > Operator or semicolon missing before %config at Build.PL line 213. > Ambiguous use of % resolved as operator % at Build.PL line 213. > Bareword "write_config" not allowed while "strict subs" in use at > Build.PL line 213. > Bareword "config" not allowed while "strict subs" in use at Build.PL > line 213. > Execution of Build.PL aborted due to compilation errors. > ---------------- > > These errors do not occur with v0.0.4. For further testing, I dropped > the v0.0.8 into the distribution and ran the testsuite against it (via > ./Build test). Seems there are several errors cropping up which I > suppose is why you have not released this version into the wild yet. I > wonder if this is a Module::Build issue as my previous usage was from a > CGI script which worked fine. I am running M::B v0.2611. > > Let me know if I can provide further information. > > > Thanks, > William