On 5/15/07, Dave Whipp <[EMAIL PROTECTED]> wrote:
A slightly tangental thought: is the behavior of C<given> with no block
defined? I.e. is
given $foo { when 1 {...} };
equivalent to
given $foo;
when 1 {...};
Doubtful.
However, I do think that it's useful to be able to treat the rest of
the current scope as a block (usually with a parameter), for certain
kinds of closure-heavy code. For example, instead of saying:
{
foo -> $x {
bar;
baz -> $y {
quux;
bizzle;
}
}
}
Writing that as, say:
{
foo -> $x;
bar;
baz -> $y;
quux;
bizzle;
}
Can really help readability in situations when the control flow wants
to look linear. That's not to say that the -> $x; syntax makes any
sense.
Luke