Subject: | Reports wrong size for strings after '.= ""' |
# perl -MDevel::Size=size -le '$a = 122; $a .= ""; print $a," " , size($a)'
122 154
# perl -MDevel::Size=size -le '$a = 12; $a .= ""; print $a," " , size($a)'
12 43
The size varies wildly even tho the string is only one byte different
("122" vs "12"). For comparisation
# perl -MDevel::Size=size -le 'print size("12")'
27
# perl -MDevel::Size=size -le 'print size("122")'
28
perl -MDevel::Size\ 99
Devel::Size version 99 required--this is only version 0.64.
BEGIN failed--compilation aborted.
# perl -v
This is perl, v5.8.6 built for i686-linux
Copyright 1987-2004, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
I first notice the issue (but couldn't find out the exact details) when
a memory comparisation for Graph::Easy reported suddenly about twice the
memory used after an upgrade to Devel::Size.
If I can send in additional details, please let me know.
Best wishes,
Tels