develooper Front page | perl.perl5.porters | Postings from October 2014

Re: Shared padlists

Thread Previous
Father Chrysostomos
October 28, 2014 20:05
Re: Shared padlists
Message ID:
I wrote:
> If we croak only if the padlist is about to be freed, then that
> changes the behaviour of:
> eval { undef &$a };
> undef &$b;
> inside a call to $a.  Formerly it would refuse to undefine &$a and
> proceed to undefine &$b.  Now it would successfully undefine &$a and
> croak when undefining &$b.
> How much code would that break?  Close to zero, I hope.

If the padlist has a reference count, then perhaps a sub call can hold
a reference count on the padlist, just as it does on the sub.  So then
we don't need to have the 'Can't undef active subroutine' error at
all.  That restriction can be lifted.

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