Ken Fox wrote:
> Modifying the caller's environment:
> 
>   $lexscope = caller().{MY};
>   $lexscope{'&die'} = &die_hard;
> 
> is especially annoying because it means that I can't
> trust lexical variables anymore.


You think you can trust them now? :-)

The PadWalker module (on CPAN) allows a subroutine to modify its
caller's lexicals in exactly this way. I wrote it some time ago, and it
hasn't yet precipitated the apocalypse :-)

 .robin.

-- 
Straw? No, too stupid a fad! I put soot on warts.

Reply via email to