perl6/doc/lib/X/Phaser/PrePost

doc src
(title) class X::Phaser::PrePost
    class X::Phaser::PrePost is Exception { }

 
Thrown when the condition inside a PRE or POST phaser evaluate to a false value. For example
    sub f($x) { PRE { $x ~~ Int } }
    f "foo";

 
Dies with
    Precondition '{ $x ~~ Int }' failed

 

Methods

(head2) phaser
    method phaser() returns Str:D

 
Returns the name of the failed phaser, "PRE" or "POST" .
(head2) condition
    method condition() returns Str:D

 
Returns the part of the source code that describes the phaser condition.

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: