Larry explained:

> : Umm..... didn't you say bare blocks were going away?
> 
> Rule #2 was invoked.
> 
> The current thinking is that any bare block will never be interpreted
> as returning a closure.  You have to use explicit C<return {}> or C<sub {}>
> to return a closure.

Or the equivalent of a C<sub {}>, namely:

        $closure = -> {...};

or:

        $closure = { $^has_a_placeholder_variable };


Or an explicit closure context:

        sub foo(&closure) {...};

        foo { this_block_is_a_closure() };


Damian

Reply via email to