Created
June 6, 2016 00:44
-
-
Save zoffixznet/0ec1c2ffc0986554b881a2a7804d4103 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zoffix@VirtualBox:~/CPANPRC/IRC-Client$ cat test.p6 | |
my ($app, $arg1, $arg2) = @*ARGS; | |
my $proc = Proc::Async.new: $app, $arg1, $arg2; | |
say "Starting `$app, $arg1, $arg2`"; | |
$proc.stdout.tap(-> $v { print "Output: $v" }); | |
say "Starting..."; | |
my $promise = $proc.start; | |
await $promise; | |
say "Done."; | |
=finish | |
my $port = 5667; | |
my $server = 't/release/servers/01-basic.pl'; | |
my $proc = Proc::Async.new: 'perl', $server, $port; | |
$proc.stdout.tap: -> $str { | |
say "FUUUCK YOU!!!"; | |
warn "WTF? $str\n"; | |
# @!out.append: $str.lines.&from-json | |
}; | |
# $proc.stderr.tap: -> $str { warn $str }; | |
await $proc.start; | |
zoffix@VirtualBox:~/CPANPRC/IRC-Client$ perl6 test.p6 echo foo bar | |
Starting `echo, foo, bar` | |
Starting... | |
Output: foo bar | |
Done. | |
zoffix@VirtualBox:~/CPANPRC/IRC-Client$ perl t/release/servers/01-basic.pl 5667 | |
{"event":"ircd_registered","args":[[null]]} | |
{"args":[[5667,1,"0.0.0.0"]],"event":"ircd_listener_add"} | |
{"args":[["zoffix",1,1465173833,"+i","~zoffix","simple.poco.server.irc","simple.poco.server.irc","realname"]],"event":"ircd_daemon_nick"} | |
{"event":"ircd_daemon_join","args":[["zoffix!~zoffix@simple.poco.server.irc","#perl6"]]} | |
{"event":"ircd_daemon_join","args":[["zoffix!~zoffix@simple.poco.server.irc","#perl"]]} | |
{"args":[["zoffix!~zoffix@simple.poco.server.irc","#perl7"]],"event":"ircd_daemon_join"} | |
^C | |
zoffix@VirtualBox:~/CPANPRC/IRC-Client$ perl6 test.p6 perl t/release/servers/01-basic.pl 5667 | |
Starting `perl, t/release/servers/01-basic.pl, 5667` | |
Starting... | |
^C | |
zoffix@VirtualBox:~/CPANPRC/IRC-Client$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment