Skip to content

Commit 6e00889

Browse files
authored
Fix Proc::Async.new
- There's no :$path, *@Args candidate - There's no `:r` argument - Include the positional multi - Include :enc and :translate-nl args
1 parent 3884abb commit 6e00889

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/Type/Proc/Async.pod6

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,21 @@ An example that opens an external program for writing:
4949
5050
=head2 method new
5151
52-
method new(:$path, *@args, :$w, :$r --> Proc::Async:D)
52+
multi method new(*@ ($path, *@args), :$w, :$enc, :$translate-nl --> Proc::Async:D)
53+
multi method new( :$path, :@args, :$w, :$enc, :$translate-nl --> Proc::Async:D)
5354
5455
Creates a new C<Proc::Async> object with external program name or path C<$path>
5556
and the command line arguments C<@args>.
5657
5758
If C<:w> is passed to C<new>, then a pipe to the external program's standard
5859
input stream (stdin) is opened, to which you can write with C<write> and
5960
C<say>.
60-
If C<:r> is present then you can tap the processes stdout and stderr.
61+
62+
The C<:enc> specifies L<the encoding|/type/IO::Handle#method_encoding> for streams
63+
(can still be overriden in individual methods) and defaults to C<utf8>.
64+
65+
If C<:translate-nl> is set to C<True> (default value), OS-specific newline
66+
terminators (e.g. C<\r\n> on Windows) will be automatically translated to C<\n>.
6167
6268
=head2 method stdout
6369

0 commit comments

Comments
 (0)