Hello,
What's the point of lines 151 and 167 in Encode.pm? Respectively:
# sub encode
$_[1] = $string if $check;
# sub decode
$_[1] = $octets if $check;
I really can't see a point in overwriting the input value... Why only
"if $check"? An example of evilness:
$ perl -MEncode -wle '$x=\"abc"; decode("us-ascii",$$x,1)'
Modification of a read-only value attempted at
/usr/lib/perl5/5.8.6/athlon-pld-linux-thread-multi/Encode.pm line 167.
Besides, the value is empty:
$ perl -MEncode -we '$x="abc"; decode("us-ascii",$x, 1); print $x' | wc
0 0 0
--
Radosław Zieliński <radek(_at_)karnet(_dot_)pl>
[ GPG key: http://radek.karnet.pl/ ]
pgpxr9R3oPIq1.pgp
Description: PGP signature