>     $_ = 1; mumble { $_ = 2 }; print;
> 
> will print 1 or 2?

Least surprise, visually, is obviously 2.

This would be true if bare blocks (even
those passed as args) just pick up from
the surrounding lexical context. And if
that were true, mumble presumably could
not do anything about this (without some
as yet undefined language support).

What does this mean:

    $_ = 1; mumble -> { $_ = 2 }; print;

perhaps the '->' could imply that $_ /is/
going to be private to the block somehow?
Could mumble somehow be a continuation that
alternated between generating values to be
plugged in to the block and executing it?


>     sub mumble (&block) {
> block()
>     }
> 
> Oddly, if we make the first argument the
> topic by default, the second block actually
> gets &block as its topic.  That's...strange.

This would go away with the above scenario.

--
ralph

Reply via email to