Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pipe two Proc::Asyncs #1580

Closed
AlexDaniel opened this issue Sep 25, 2017 · 2 comments
Closed

How to pipe two Proc::Asyncs #1580

AlexDaniel opened this issue Sep 25, 2017 · 2 comments
Labels
docs Documentation issue (primary issue type)

Comments

@AlexDaniel
Copy link
Member

The docs on Proc have a nice example:

my $p1 = run 'echo', 'Hello, world', :out;
my $p2 = run 'cat', '-n', :in($p1.out), :out;
say $p2.out.get;

We should provide the same thing for Proc::Async.

See also: https://irclog.perlgeek.de/perl6/2017-09-25#i_15213849

@AlexDaniel AlexDaniel added the docs Documentation issue (primary issue type) label Sep 25, 2017
@zoffixznet
Copy link
Contributor

This seems to work:

my $proc1 = Proc::Async.new: "cal"; my $proc2 = Proc::Async.new: «perl6 -e "slurp.uc.put"»; $proc2.bind-stdin: $proc1.stdout: :bin; await $proc1.start, $proc2.start

The .bind-stdin, .bind-stdout (and .bind-stderr) methods don't appear to be documented, but are featured in master roast.

7ojo pushed a commit that referenced this issue Oct 26, 2017
Note that methods .bind-stdin, .bind-stdout and .bind-stderr still needs
documentation.
@AlexDaniel
Copy link
Member Author

I think this was resolved in db2e07b.

There's a separate issue for undecumented .bind-* methods: #1470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type)
Projects
None yet
Development

No branches or pull requests

2 participants