Larry Wall wrote:
Lots of interesting ideas.  But I don't think the reverse-test
situation will arise all that frequently.  How 'bout we let the user
just say:

    my macro statement_control:<test> { "when .accepts: " }

or some such...

IIRC, you don't even need .accepts for this.  You could just say

 given $pattern {
   when $a ~~ $_ { ... }
   when $b ~~ $_ { ... }
   when $c ~~ $_ { ... }
 }

...since an explicit smart-match is a boolean expression (it is, isn't
it?), and boolean expressions implicitly smart-match according to
their truth.  Right?

--
Jonathan "Dataweaver" Lang

Reply via email to