develooper Front page | perl.perl5.porters | Postings from April 2007

Re: idea for yet another LNV and caller() return value (was: The Strict trap)

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
April 25, 2007 09:26
Subject:
Re: idea for yet another LNV and caller() return value (was: The Strict trap)
Message ID:
b77c1dce0704250926h5b503331yc325ef7dc97f4a2b@mail.gmail.com
On 25/04/07, David Nicol <davidnicol@gmail.com> wrote:
> I know that Perl maintains a list of things to do on scope exit, which is
> where C<local>ized variables get reassigned to their original values, and
> possibly other things as well.  How tricky would it be to provide perl-side
> access to that list, in the form of, say @^TTD_ON_SCOPE_EXIT,
> or in the form of a twelfth result from C<caller> -- although caller works
> at the granularity of stack frames rather than scopes, so something similar
> that works with lexical scopes, and enclosers of lexical scopes, would make
> more sense.  C<encloser> perhaps?

You mean add Hook::Scope to the core ?
(I haven't tested it with blead, but since it's ridiculously simple, I
think it should.)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About