Re: boo-boo in run docs?

[email protected] (ToddAndMargo via perl6-users) Sat, 8 Nov 2025 01:16:14 -0800
Newsgroups perl.perl6.users
Message-ID <[email protected]>
On 11/7/25 1:43 AM, Peter Pentchev wrote:
> On Thu, Nov 06, 2025 at 07:50:47PM -0800, ToddAndMargo via perl6-users wrote:
>> On 11/6/25 4:44 PM, Peter Pentchev wrote:
>>> What I object to is mainly assertions that the reference-style
>>> documentation is incomplete
>>
>> Proc is missing exitcode, command, mulitimethod, pid,
>> exitcode, and signal from its OOP declaration at
>> the top of the page.
> 
> It is not. Please read some more of my mails. There is a difference
> between the "new" method and "the OOP declaration": the whole page
> documents the methods that you can use on a Proc class or object.

AI Slop?

https://search.brave.com/search?q=raku+are+methods+part+of+an+oop+structure&spellcheck=0&source=alteredQuery&summary=1&conversation=2af824f8fb9764e4613372

Yes, methods are a fundamental part of the object-oriented
programming (OOP) structure in Raku. They are functions
defined within a class that operate on the object's data,
defining the behavior of the objects. Methods are declared
using the method keyword inside a class body and can access
the object's attributes using the self invocant or a custom
invocant name specified in the method's signature. All objects
in Raku derive from the root class Mu, which provides a set of
default methods, and every object supports methods from this
hierarchy. Methods can be public by default, or made private
by prepending a ! to the method name. They can also have typed
parameters, return types, and support features like multi-methods.
The ability to define methods within classes is central to
Raku's support for OOP, enabling encapsulation and the bundling
of data and operations that act on that data.

> 
> Take a look at https://docs.raku.org/type/Date
> 
> ...is it missing "today" and "first-date-in-month" at the top?
> 
> It is not. They are methods that are listed where the methods are
> listed in the documentation of any Raku class.
> 
> G'luck,
> Peter
> 

You are correct of the multimethod.  My bad.

This what the docs should include:

You will note exitcode, command, pid are
included in the run's method declaration:

Source:
     https://github.com/rakudo/rakudo/blob/main/src/core.c/Proc.rakumod

Proc:

my class Proc {
     has IO::Pipe $.in;
     has IO::Pipe $.out;
     has IO::Pipe $.err;
     has Str $.os-error;
     has $.exitcode is default(Nil);  \
     has $.signal;
     has $.pid is default(Nil);
     has @.command;

     has Proc::Async $!proc;
     has Bool $!w;
     has @!pre-spawn;
     has @!post-spawn;
     has $!active-handles = 0;
     has &!start-stdout;
     has &!start-stderr;
     has $!finished;


 From run (a method inside Proc's OOP structure):

multi sub run(
    *@args where .so,
    :$in = '-',
    :$out = '-',
    :$err = '-',
     Bool :$bin,
     Bool :$chomp = True,
     Bool :$merge,
     Str  :$enc,
     Str:D :$nl = "\n", :
     $cwd = $*CWD, :
     $env,
     :$arg0,
     :$win-verbatim-args = False)
{
     my $proc := Proc.new(:$in, :$out, :$err, :$bin, :$chomp, :$merge, 
:$enc, :$nl);
     $proc.spawn(@args, :$cwd, :$env, :$arg0, :$win-verbatim-args);
     $proc
}


Every single one of these values in Proc and Pro's run method
need to be discussed in the documentation.