On Sat, Jul 31, 2010 at 11:47:13AM -0400, Brandon S Allbery KF8NH wrote:
> [...], and
> if the point is to be a general case statement then "when <expr> <block>"
> should smartmatch <expr> against $_ instead of evaluating it with $_
> available as a shorthand/topic.
This is exactly what "when <expr> block" does -- it smartmatches
<expr> against $_. The problem is that there are at least two
interpretations of a true result of <expr>:
when True { ... } # execute when $_ is exactly "True"
when foo() { ... } # execute when foo() returns true
It's been decided that the latter is far more useful in general;
there are plenty of ways to express the former that are much
less ambiguous.
Pm