Nathan Torkington wrote:
> 
> We're going to have to
> think of a way to consistently say "do this in my caller's lexical
> scope" without it becoming a nasty upvar hell.

Perhaps this would work: a way to override (i.e. quash) the 
behavior that instantiates a new scope on entry to a lexical
block, using the current one instead.  So that given

        my $lex = 1;
        local $loc = 1;
        noscope require Bar;

where Bar.pm contains

        my $lex = 2;
        local $loc = 2;

$lex and $loc in the caller are both assigned 2, overwriting 1.
And any other lexically scoped effects are similarly modified.

This would have the advantage of being under the caller's control,
and the "upvar" effect is strictly limited to one level, to one
specific scope (per use of noscope()).


-- 
John Porter

        We're building the house of the future together.

Reply via email to