develooper Front page | perl.perl6.language | Postings from June 2005

Re: &?CALLER::BLOCK vs. any hope of efficient compilation

Thread Previous
Larry Wall
June 14, 2005 08:58
Re: &?CALLER::BLOCK vs. any hope of efficient compilation
Message ID:
On Tue, Jun 14, 2005 at 04:13:08PM +0200, Chip Salzenberg wrote:
: It therefore would a Bad Thing if &?CALLER::BLOCK worked generally.
: If the caller _is_ a block that was already marked at compile time as
: requiring full sub properties then, of course, it's no problem to use
: the syntax &?CALLER::BLOCK to denote it.

It's okay to optimize away callability, though I'd like to point out
that &?CALLER::BLOCK by itself doesn't imply a call.  It might most
often be used to get at the block's metadata without the intent of
calling it.  And in that case it needs only a tiny bit of dynamic
support, probably just some link to the current (static) lexical
block scope object that you could probably get from caller() anyway.
But it's fine to throw an exception if they actually try to call the
beastie unexpectedly.


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