Hi All,
With Bruce's help, I have been updating my keeper
on "run"
I am missing what run does with
(not finding them in https://docs.raku.org/routine/run)
:$cwd
:$env
:$arg0 and
:$win-verbatim-args
This is what I have so far:
method new(Proc:U:
:$in = '-',
:$out = '-',
:$err = '-',
Bool :$bin = False,
Bool :$chomp = True,
Bool :$merge = False,
Str:D :$enc = 'UTF-8',
Str:D :$nl = "\n",
--> Proc:D)
sub run(
*@args ($, *@),
:$in = '-', # use `:$in`, `$:out`, and `:$err` arguments
to redirect to
# different file handle, thus creating a
kind of pipe
:$out = '-', # syntax to change these values is
# :out($alt-handle)
:$err = '-',
Bool :$bin = False, # $bin controls whether the streams are
handled as
# binary (i.e. Blob object) or text (i.e.
Str objects).
# If $bin is False, $enc holds the character
encoding
# to encode strings sent to the input stream
and decode
# binary data from the output and error streams.
Bool :$chomp = True, # With $chomp set to True, newlines are
stripped from
# the output and err streams when reading
with lines or get.
Bool :$merge = False, # If $merge is set to True, the standard
output and error
# stream end up merged in $proc.out.
Str:D :$enc = 'UTF-8', # the type of text: UTF-8, UTF-16, etc.
Str:D :$nl = "\n", # $nl controls what your idea of a newline is
:$cwd = $*CWD,
Hash() :$env = %*ENV,
:$arg0,
:$win-verbatim-args = False
--> Proc:D)