Skip Menu |
Report information
Id: 130136
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: Aleks-Daniel Jakimenko-Aleksejev <alex.jakimenko [...] gmail.com>
Date: Sun, 20 Nov 2016 01:56:01 +0200
To: rakudobug [...] perl.org
Subject: [RFC] Proc.new has $nl parameter while everything else seems to have separate $nl-in and $nl-out
It seems like there is a lot of confusion going on with $nl vs $nl-in/$nl-out. This is especially a problem given that things do not complain if you pass a wrong named parameter to them (e.g. here nl is ignored: 「open nl => “\r” …」).

There was an issue with our docs (see https://irclog.perlgeek.de/perl6/2016-11-19#i_13597877 ), which is now fixed. However, once I started grepping our docs to see if there are any other wrong mentions of $nl, I stumbled upon Proc.

From Proc source: ( https://github.com/rakudo/rakudo/blob/nom/src/core/Proc.pm ):

submethod BUILD(…, Str:D :$nl = "\n", …) {
… … …
    $!in  = IO::Pipe.new(:proc(self), :path(''), :$chomp, nl-out => $nl);
… … …
    $!out = IO::Pipe.new(:proc(self), :path(''), :$chomp, nl-in  => $nl);
… … …
}

So it seems like Proc can perfectly accept separate nl-in and nl-out, but for some reason it doesn't.

My idea is that we should change it everywhere to nl-in/nl-out for consistency reasons. However, some sort backward compatibility thingy should be implemented so that we don't break existing code.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org