sub default question
[email protected] (ToddAndMargo via perl6-users) Wed, 19 Nov 2025 01:13:23 -0800
| Newsgroups | perl.perl6.users |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
https://github.com/rakudo/rakudo/blob/main/src/core.c/Proc.rakumod
232: multi sub run(*@args where .so, :$in = '-', :$out = '-', :$err = '-',
Here is my confusion. The above sets
:$in = '-', :$out = '-', :$err = '-',
to "-" as the default.
But if you leave
:$out and :$err
off the run line, STDOUT and STDERR do not
get captured and are sent to the console.
My confusion is when you leave a parameter
off that is set with a default in the sub
deceleration, I thought the sub declaration
was used.
What am I missing?
Yours in Confusion,
-T