"Trey Harris" <[EMAIL PROTECTED]> wrote i > It's easy to just say "don't nest placeholder-using closures," but that > doesn't seem workable in practice since every block is a closure, unless > placeholders are forbidden from all but the most trivial cases. Absurdly > trivial, it seems. How about > > $sub = { if $^a { $^b = $^a } };
I would like to think that not all blocks have the same context. We could define a "placeholder" scope as being a lexical scope that sends data to a block. Thus C<for>, C<map, C<grep> etc., all introduce lexical scopes that are tagged as placeholder scopes; but C<if> and C<while> do not. Its a bit like an inside-out-in-reverse C<wantarray> concept. Dave.