Skip to content

Commit

Permalink
Document that Failure.handled is an lvalue
Browse files Browse the repository at this point in the history
Something I learned today as part of code review. Thought it might be useful in the documentation.
  • Loading branch information
Carl Mäsak authored and moritz committed May 15, 2017
1 parent e309ddd commit acf4040
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/Type/Failure.pod6
Expand Up @@ -34,6 +34,14 @@ Returns C<True> for handled failures, C<False> otherwise.
sub f() { fail }; my $v = f; say $v.handled; # OUTPUT: «False␤»
The C<handled> method is an lvalue, which means you can also use it to set the
handled state:
sub f() { fail }
my $v = f;
$v.handled = True;
say $v.handled; # OUTPUT: «True␤»
=head2 method exception
Defined as:
Expand Down

0 comments on commit acf4040

Please sign in to comment.