Skip Menu |

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

Report information
The Basics
Id: 36607
Status: resolved
Priority: 0/
Queue: Config-General

People
Owner: tlinden [...] cpan.org
Requestors: "Jeffrey Ratcliffe" (no email address)
Cc:
AdminCc:

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



Subject: config-general: reads garbage if space in name of heredoc
Date: Tue, 10 Jun 2008 09:26:32 +0200
To: bug-config-general [...] rt.cpan.org
From: "Jeffrey Ratcliffe" <jeffrey.ratcliffe [...] gmail.com>
If there is a space in the name of a heredoc, it is read as garbage: <cache> Gray[Error Diffusion] = <<EOF Usage: scanimage [OPTION]... Start image acquisition on a scanner device and write PNM image data to standard output. EOF </cache> I attach an example script to read the above.

Message body is not shown because sender requested not to inline it.

Download in
application/octet-stream 218b

Message body not shown because it is not plain text.

fixed in 2.39 please note, that this will only work with split delimiter "gues" (the default). If you specify your own delimiter, it will not work!
Subject: Re: [rt.cpan.org #36607] config-general: reads garbage if space in name of heredoc
Date: Wed, 18 Jun 2008 16:31:59 +0200
To: bug-Config-General [...] rt.cpan.org
From: "Jeffrey Ratcliffe" <jeffrey.ratcliffe [...] gmail.com>
2008/6/15 T. Linden via RT <bug-Config-General@rt.cpan.org>: Show quoted text
> please note, that this will only work with split delimiter "gues" (the > default). If you specify your own delimiter, it will not work!
The new version cannot cope with the following config file. If -SplitPolicy is specified, the the heredoc is not correctly read, and if not, then "cache options" is not correctly read, with error message "Config::General: Cannot create hashref from <cache> because there is already a scalar option 'cache' with value 'options = 1' at ./CG.pl line 5". cache options = 1 <cache> Gray[Error Diffusion] = <<EOF Usage: scanimage [OPTION]... Start image acquisition on a scanner device and write PNM image data to standard output. EOF </cache> I attach an example script to read the above.
Download in
application/octet-stream 236b

Message body not shown because it is not plain text.

Message body is not shown because sender requested not to inline it.

Did you read my last mail, didn't you? As I said there, this is fixed in version 2.40. t.pl: #!/usr/bin/perl -w use lib qw(/home/scip/D/ConfigModul/Config-General-2.40/blib/lib); use strict; use Data::Dumper; use Config::General qw(ParseConfig SaveConfig); my %cfg = ParseConfig( -ConfigFile => shift(), -InterPolateVars => 1, -MergeDuplicateBlocks => 1, -MergeDuplicateOptions => 1, -StrictVars => 1, -SplitPolicy => 'equalsign', # -SplitDelimiter => '\s*=\s*', ); print Dumper(\%cfg); exit; Using your config this is the result: scip@mutant: $ ./t.pl t.cfg $VAR1 = { 'cache options' => '1', 'cache' => { 'Gray[Error Diffusion]' => 'Usage: scanimage [OPTION]... Start image acquisition on a scanner device and write PNM image data to standard output.' } }; If that looks like garbage for you, I am very sorry. Ticket CLOSED.