Re: What's up with %MY?

2001-09-05 Thread Robin Houston
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

RE: What's up with %MY?

2001-09-05 Thread Dave Mitchell
Garrett Goebel [EMAIL PROTECTED] wrote From: Dave Mitchell [mailto:[EMAIL PROTECTED]] sub Foo::import { my %m = caller(1).{MY}; # or whatever %m{'$x'} = 1; } ... sub f { my $x = 9; use Foo; # does $x become 1, or $x redefined, or runtime # error, or

RE: What's up with %MY?

2001-09-05 Thread Dave Mitchell
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

RE: What's up with %MY?

2001-09-05 Thread Dan Sugalski
At 01:45 PM 9/5/2001 +0100, Dave Mitchell wrote: 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'

Re: What's up with %MY?

2001-09-05 Thread Ken Fox
[EMAIL PROTECTED] wrote: Clearly caller() isn't what we want here, but I'm not quite sure what would be the correct incantation. I've always assumed that a BEGIN block's caller() will be the compiler. This makes it easy for the compiler to lie about %MY:: and use the lexical scope being

Labels

2001-09-05 Thread Bryan C . Warnock
Hmm is this such a good thing? my $a = 0; GORK: while( 1 ) { print Rin ; GORK: if ( 1 ) { print Tin ; goto GORK if $b ^= 1; print \n; next GORK; } } -- Bryan C. Warnock [EMAIL PROTECTED]

Re: Labels

2001-09-05 Thread Michael G Schwern
On Wed, Sep 05, 2001 at 09:02:00PM -0400, Bryan C. Warnock wrote: Hmm is this such a good thing? Using goto LABEL? No. ;) Would be nice if Perl warned one about multiple labels of the same name in the same call stack, though. my $a = 0; GORK: while( 1 ) { print Rin ;

Re: debugger API PDD, v1.1

2001-09-05 Thread Rick Welykochy
Dave Storrs wrote: [schnippe] =head3 Generating Code on the Fly What's this =head3 stuff? My pod processor barfs on it :) Aye, here's the rub. _ Rick Welykochy || Praxis Services Pty Limited One of the main advantages of the 'dot-bomb' downturn

Re: debugger API PDD, v1.1

2001-09-05 Thread Simon Cozens
On Wed, Sep 05, 2001 at 08:32:36PM +1000, Rick Welykochy wrote: Dave Storrs wrote: [schnippe] =head3 Generating Code on the Fly What's this =head3 stuff? My pod processor barfs on it :) Then update it. :)

Re: LangSpec: Statements and Blocks

2001-09-05 Thread Bryan C . Warnock
It's still largely incomplete, and getting a little weighty, so v.2 is up on my web page: http://members.home.net/bcwarno/Perl6/ref/statements.txt I'm sure I didn't cover all the corrections from the first go round, so if I missed anything, gently poke me in the side. What's been added?