Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 3dd0a22eb193fa78b733ebb676b52a8a2b795764 1 parent 220f088
@TimToady TimToady authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 S03-operators.pod
View
6 S03-operators.pod
@@ -14,8 +14,8 @@ Synopsis 3: Perl 6 Operators
Created: 8 Mar 2004
- Last Modified: 23 Feb 2013
- Version: 260
+ Last Modified: 6 Mar 2013
+ Version: 261
=head1 Overview
@@ -3594,6 +3594,7 @@ as a default because the more specific types listed above it didn't match.
Any False ~~ False match (parsewarn on literal token)
Any Match ~~ Successful match (parsewarn on literal token)
Any Nil ~~ Benign failure (parsewarn on literal token)
+ Any Failure Failure type check (okay, matches against type)
Any * block signature match block successfully binds to |$_
Any Callable:($) item sub truth X($_)
@@ -3601,6 +3602,7 @@ as a default because the more specific types listed above it didn't match.
Any Bool simple truth X (treats Bool value as success/failure)
Any Match match success X (treats Match value as success)
Any Nil benign failure X (treats Nil value as failure)
+ Any Failure malign failure X (passes Failure object through)
Any Numeric numeric equality +$_ == X
Any Stringy string equality ~$_ eq X
Any Whatever always matches True
Please sign in to comment.
Something went wrong with that request. Please try again.