Skip Menu |

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

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

People
Owner: BRICKER [...] cpan.org
Requestors: jameshenderson [...] ruggedcom.com
toddr [...] cpanel.net
Cc:
AdminCc:

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



Subject: Accepting Scalars as Input/Output
Date: Thu, 21 Sep 2006 17:26:09 -0400
To: bug-config-std [...] rt.cpan.org
From: James Henderson <jameshenderson [...] ruggedcom.com>
Hello, During my use of this module I found need of the functionality of parsing configuration information stored in a scaler, rather than a file. So, I hacked together some functionality to allow the module to accept scalars as well as filenames if you give it a specific option. It occurs to me that other people may want this as a feature (as well as the corresponing write to a scalar), are there any plans to make such functionality available, or is it considered to be an unneccessary complication to a simple module? Thanks, James
Subject: read from string support
Hi, it would be very hand if Config::Std supported a sub to read from strings directly.
Subject: Re: [rt.cpan.org #37832] read from string support
Date: Sat, 26 Jul 2008 11:50:43 -0500
To: bug-Config-Std [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Todd E. Rinaldo wrote: Show quoted text
> it would be very hand if Config::Std supported a sub to read from > strings directly.
It does. If you pass a reference to the string as the first argument to read_config() it uses that string as the source of the config info. For example: use Config::Std; my $cfg = q{ [Section 1] attr1 = at attr2 = bat [Section 2] attr3 = cat }; read_config(\$cfg => my %config); use Data::Dumper 'Dumper'; warn Dumper [ \%config ]; Damian
From: todd.e.rinaldo [...] jpmorgan.com
Show quoted text
> It does. If you pass a reference to the string as the first argument
to Show quoted text
> read_config() it uses that string as the source of the config info.
Could I suggest this be added to the docs? If you give me a path to svn, I'll submit a patch.
late close - doc patch previously applied