On May 12, 2009, at 5:41 PM, Nicholas Clark wrote:
> On Tue, May 12, 2009 at 04:24:28PM -0500, Graham Barr wrote:
>
>> I have not followed closely enough to know if that dropping of magic
>> is intentional
>
> Totally intentional. 24+ bytes used per typeglob (hence per sub or
> method)
> were used for magic, the sole purpose of which was to deal with
> stringifying
> the typeglob and assigning strings to it. With several thousand
> typeglobs
> created by a small program that directly pulls in a moderate number of
> modules, it soon adds up.
Sure, OK. As I said I had not been following closely.
I have done a little more digging
It seems to me that the root of this issue is that
in pp_rv2gv where SvTYPE(sv) == SVt_PVIO a call is
made to
gv_init(gv, 0, "", 0, 0);
after this, in blead SvOK(gv) returns true, but in 5.8.9 SvOK(gv) is
false
this is why defined($y) is true on 5.10.0 but false on 5.8.x and before
While not a fix, because lib/Benchmark and op/tie fail, I put in a
call to
SvOK_off(sv); at the end of that block in 5.10.0 code.
The result was that the following matches 5.8.x and before
$ ./perl -wle '$x = *STDIN{IO}; $y = *$x; print "$x"; print "$y"'
IO::Handle=IO(0x9704eb8)
Use of uninitialized value $y in string at -e line 1.
Graham.
Thread Previous
|
Thread Next