You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Language/phasers.pod6
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,11 @@ automatically called at the appropriate moment. These auto-called blocks are
14
14
known as I<phasers>, since they generally mark the transition from one phase of
15
15
computing to another. For instance, a C<CHECK> block is called at the end of
16
16
compiling a compilation unit. Other kinds of phasers can be installed as well;
17
-
these are automatically called at various times as appropriate, and some of
18
-
them respond to various control exceptions and exit values. For instance, some phasers might be called if the exit from a block is successful or not, with I<success> in this case defined by returning with a defined value or list without any C<Failure> or exception in the process.
17
+
these are automatically called at various times as appropriate, and some of them
18
+
respond to various control exceptions and exit values. For instance, some
19
+
phasers might be called if the exit from a block is successful or not, with
20
+
I<success> in this case defined by returning with a defined value or list
21
+
without any C<Failure> or exception in the process.
19
22
20
23
Here is a summary:
21
24
@@ -93,8 +96,9 @@ handlers are supposed to reduce uncertainty, not increase it.)
93
96
94
97
X<|Phasers, will trait>
95
98
Some of these phasers also have corresponding traits that can be set on
96
-
variables; they use C<will> followed by the name of the phaser in lowercase. These have the advantage of passing the variable in question into
97
-
the closure as its topic:
99
+
variables; they use C<will> followed by the name of the phaser in lowercase.
100
+
These have the advantage of passing the variable in question into the closure as
101
+
its topic:
98
102
99
103
our $h will enter { .rememberit() } will undo { .forgetit() };
100
104
@@ -444,8 +448,9 @@ with C<tap>.
444
448
445
449
=head2X<DOC|Asynchronous Phasers, DOC>
446
450
447
-
The phasers C<BEGIN>, C<CHECK> and C<INIT> are run only in documentation mode when
448
-
prefixed with the C<DOC> keyword. The compiler is in documentation when run with C<--doc>.
451
+
The phasers C<BEGIN>, C<CHECK> and C<INIT> are run only in documentation mode
452
+
when prefixed with the C<DOC> keyword. The compiler is in documentation when run
453
+
with C<--doc>.
449
454
450
455
DOC INIT { say 'init' } # prints 'init' at initialization time when in documentation mode.
0 commit comments