Skip to content

Commit 988a9df

Browse files
committed
Extend examples for "CX::Done can be caught inside CONTROL phaser"
1 parent 09b84e6 commit 988a9df

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/Language/phasers.pod6

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,20 +396,23 @@ Runs when an exception is raised by the current block, before the LEAVE phase.
396396
=head2 X<CONTROL|Phasers, CONTROL>
397397
398398
Runs when a control exception is raised by the current block, before the LEAVE
399-
phase. It is raised by C<return>, C<fail>, C<redo>, C<next>, C<last>, C<emit>,
399+
phase. It is raised by C<return>, C<fail>, C<redo>, C<next>, C<last>, C<done>, C<emit>,
400400
C<take>, C<warn>, C<proceed> and C<succeed>.
401401
402402
say elems gather {
403403
CONTROL {
404404
when CX::Warn { say "WARNING!!! $_"; .resume }
405405
when CX::Take { say "Don't take my stuff"; .resume }
406+
when CX::Done { say "Done"; .resume }
406407
}
407408
warn 'people take stuff here';
408409
take 'keys';
410+
done;
409411
}
410412
# OUTPUT:
411413
# WARNING!!! people take stuff here
412414
# Don't take my stuff
415+
# Done
413416
# 0
414417
415418

0 commit comments

Comments
 (0)