Skip Menu |

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

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

People
Owner: tlinden [...] cpan.org
Requestors: berge [...] gmx.de
Cc:
AdminCc:

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



Subject: Parameter -String must be a SCALAR!
Date: Sun, 13 May 2007 14:44:42 +0200
To: bug-Config-General [...] rt.cpan.org
From: "Andreas Berge" <berge [...] gmx.de>
In Config-General 2.32 (and probably 2.33) I got Parameter -String must be a SCALAR! when trying to feed a reference to an array with configline -String => \@configlines According to the documentation, it is also possible to feed an array reference to -String. And this works with at least version 2.22. I think the problem is this modified block: if (ref(\$conf{-String}) eq 'SCALAR') { if ( $conf{-String}) { $self->{StringContent} = $conf{-String}; } delete $conf{-String}; } else { croak "Parameter -String must be a SCALAR!\n"; } Because it's allowed to pass a reference to an array, the condition must be for SCALAR or REF (REF to ARRAY). Workaround: joining the array to a string. :) -- Andreas -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Well, I see the point, the question is wether to re-implement the documented behavior or to fix the documentation. I'm unsure.
added array-ref support in 2.34.