Skip to content

Commit 3dd0a22

Browse files
committed
Include Failure in smartmatch passthroughs
Only actual failure objects pass through. You can match against Failure as a literal type. Presumably this can be distinguished by Failure.ACCEPTS.
1 parent 220f088 commit 3dd0a22

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

S03-operators.pod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Synopsis 3: Perl 6 Operators
1414

1515
Created: 8 Mar 2004
1616

17-
Last Modified: 23 Feb 2013
18-
Version: 260
17+
Last Modified: 6 Mar 2013
18+
Version: 261
1919

2020
=head1 Overview
2121

@@ -3594,13 +3594,15 @@ as a default because the more specific types listed above it didn't match.
35943594
Any False ~~ False match (parsewarn on literal token)
35953595
Any Match ~~ Successful match (parsewarn on literal token)
35963596
Any Nil ~~ Benign failure (parsewarn on literal token)
3597+
Any Failure Failure type check (okay, matches against type)
35973598
Any * block signature match block successfully binds to |$_
35983599

35993600
Any Callable:($) item sub truth X($_)
36003601
Any Callable:() simple closure truth X() (ignoring $_)
36013602
Any Bool simple truth X (treats Bool value as success/failure)
36023603
Any Match match success X (treats Match value as success)
36033604
Any Nil benign failure X (treats Nil value as failure)
3605+
Any Failure malign failure X (passes Failure object through)
36043606
Any Numeric numeric equality +$_ == X
36053607
Any Stringy string equality ~$_ eq X
36063608
Any Whatever always matches True

0 commit comments

Comments
 (0)