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.
- RFC 143 (v1) Case ignoring eq and cmp operators Perl6 RFC Librarian
- Re: RFC 143 (v1) Case ignoring eq and cmp operato... Jarkko Hietaniemi
- Re: RFC 143 (v1) Case ignoring eq and cmp operato... Kevin Walker
- Re: RFC 143 (v1) Case ignoring eq and cmp ope... Nathan Torkington
- Re: RFC 143 (v1) Case ignoring eq and cmp... John Porter
- Re: RFC 143 (v1) Case ignoring eq and cmp... Bryan C . Warnock
- Re: RFC 143 (v1) Case ignoring eq and cmp... David L. Nicol
- Re: RFC 143 (v1) Case ignoring eq and... Nathan Torkington
- Re: RFC 143 (v1) Case ignoring eq and cmp operato... Tom Christiansen
- Re: RFC 143 (v1) Case ignoring eq and cmp ope... Dan Sugalski
- Re: RFC 143 (v1) Case ignoring eq and cmp... Tom Christiansen
- Re: RFC 143 (v1) Case ignoring eq and... Dan Sugalski
- Re: RFC 143 (v1) Case ignoring e... Nathan Torkington
- Re: RFC 143 (v1) Case ignoring eq and cmp ope... Jarkko Hietaniemi
- Re: RFC 143 (v1) Case ignoring eq and cmp... Glenn Linderman
