can I just clarify something about delete:
my $x = 1;
{
my $x = 2;
delete $MY::{'$x'};
print $x;
$mysub = sub {$x};
}
print $mysub->();
People seem agreed that print $x should do the equivalent of
throw "lexical '$x' no longer in scope"
rather than printing 1, but what should print $mysub->() do?
I'd like it to also throw the same error, preferably at clone time.
Comments?
- Re: What's up with %MY? Damian Conway
- Re: What's up with %MY? Dan Sugalski
- Re: What's up with %MY? Uri Guttman
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Dan Sugalski
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Ken Fox
- Re: What's up with %MY? Dan Sugalski
- RE: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Ken Fox
- RE: What's up with %MY? Dave Mitchell
- RE: What's up with %MY? Dan Sugalski
- RE: What's up with %MY? Dave Mitchell
- RE: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? David L. Nicol
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Bart Lateur
- Re: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Dave Mitchell
