Skip to content

Commit 37b2a4c

Browse files
committed
Eliminates a few categories
But some of the others mentioned in #1410 might still be useful. Phasers and Asynchronous phasers, for example. Also some reflow.
1 parent 6377edf commit 37b2a4c

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

doc/Language/ipc.pod6

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
=SUBTITLE Programs running other programs and communicating with them
66
77
X<|IPC>
8+
=head1 X<Running programs>
89
9-
=head1 X<running|running programs>
10-
11-
Many programs need to be able to run other programs. Running a program in Perl 6
12-
is as easy as:
10+
Many programs need to be able to run other programs, and we need to pass
11+
information to them and receive their output and exit status. Running a program
12+
in Perl 6 is as easy as:
1313
1414
run 'git', 'status';
1515
@@ -25,11 +25,11 @@ on.
2525
2626
Caution should be taken when using C<shell> with user input.
2727
28-
=head1 X<proc|Proc object>
28+
=head1 The C<Proc> object
2929
3030
Both C<run> and C<shell> return a L<Proc|/type/Proc> object, which can be used
31-
to communicate with the process in more detail. Please note that unless you close
32-
all output pipes, the program will usually not terminate.
31+
to communicate with the process in more detail. Please note that unless you
32+
close all output pipes, the program will usually not terminate.
3333
3434
my $git = run 'git', 'log', '--oneline', :out;
3535
for $git.out.lines -> $line {
@@ -63,7 +63,7 @@ and check the exitcode.
6363
say 'something went wrong';
6464
}
6565
66-
=head1 X<async|Proc::Async object>
66+
=head1 The C<Proc::Async> object
6767
6868
When you need more control over the communication with and from another process,
6969
you will want to make use of L<Proc::Async|/type/Proc::Async>. This class
@@ -87,9 +87,9 @@ ability to send signals to that program.
8787
await $done;
8888
=end code
8989
90-
Here is a small program that uses the "tail" program to print out the contents
91-
of the log named C<system.log> for 10 seconds and then tells the program to stop
92-
with a QUIT signal.
90+
The small program above uses the "tail" program to print out the contents of the
91+
log named C<system.log> for 10 seconds and then tells the program to stop with a
92+
QUIT signal.
9393
9494
Whereas C<Proc> provides access to output using C<IO::Handle>s, C<Proc::Async>
9595
provides access using asynchronous supplies (see L<Supply|/type/Supply>).

doc/Language/phasers.pod6

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ automatically called at the appropriate moment. These auto-called blocks are
1414
known as I<phasers>, since they generally mark the transition from one phase of
1515
computing to another. For instance, a C<CHECK> block is called at the end of
1616
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.
1922
2023
Here is a summary:
2124
@@ -93,8 +96,9 @@ handlers are supposed to reduce uncertainty, not increase it.)
9396
9497
X<|Phasers, will trait>
9598
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:
98102
99103
our $h will enter { .rememberit() } will undo { .forgetit() };
100104
@@ -444,8 +448,9 @@ with C<tap>.
444448
445449
=head2 X<DOC|Asynchronous Phasers, DOC>
446450
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>.
449454
450455
DOC INIT { say 'init' } # prints 'init' at initialization time when in documentation mode.
451456

0 commit comments

Comments
 (0)