develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #108280] @ISA self-loop

Father Chrysostomos via RT
August 3, 2013 01:03
[perl #108280] @ISA self-loop
Message ID:
On Sun Jan 15 12:43:57 2012, sprout wrote:
> $ ./perl -Ilib -le '@ISA = "foo"; use Scalar::Util weaken;
> weaken($a=\@ISA); undef *ISA; print $a'
> ARRAY(0x826ba0)
> @ISA has its own loop that prevents it from being freed.
> It seems we need a way for the backreferences array to point to magic,
> not just SVs.

No, what we need is for the elements’ magic to have no reference count
on the array and for the array to have free magic that clears the magic
of its elements (for efficiency only if their refcount > 1).


Father Chrysostomos Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About