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