Skip to content
Permalink
Browse files

Consistify Proc::Async.command with Proc.command

The Proc.command is part of 6.c spec but Proc::Asyc.path/.args do
not appear to be tested even in 6.d propspec.

Make interface consistent by putting up .path/.args up for deprecation
and adding Proc::Async.command

Fixes R#2444 #2444
  • Loading branch information...
zoffixznet committed Nov 4, 2018
1 parent 7d4b57d commit 45bbc9465c9d77e26c1584b15ce6500507948d51
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/core/Proc/Async.pm6
@@ -97,8 +97,9 @@ my class Proc::Async {
has $!stderr_descriptor_vow;
has $!stdout_descriptor_used = Promise.new;
has $!stderr_descriptor_used = Promise.new;
has $.path;
has @.args;
has $.path; # XXX TODO deprecated on 2018-11-04
has @.args; # XXX TODO deprecated on 2018-11-04
has @.command is List;
has $.w;
has $.enc = 'utf8';
has $.translate-nl = True;
@@ -120,8 +121,11 @@ my class Proc::Async {

proto method new(|) {*}
multi method new(*@args where .so) {
# XXX TODO .args and .path deprecated on 2018-11-04 to be
# replaced by .command https://github.com/rakudo/rakudo/issues/2444
my @command := @args.List;
my $path = @args.shift;
self.bless(:$path, :@args, |%_)
self.bless(:$path, :@args, :@command, |%_)
}

submethod TWEAK(--> Nil) {

0 comments on commit 45bbc94

Please sign in to comment.
You can’t perform that action at this time.