X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=bin%2Fobject-remote-node;h=acdf165055058cb7dec01b7d402b8186c698f610;hp=638b6bc5d2b5898d6c749ce4c620cdbf94432280;hb=dc28afe80b27f0eb81eef66e6ba554a7c1fb6e41;hpb=ad4f54b29c5f84aa010b456303b24647c0e28ae7 diff --git a/bin/object-remote-node b/bin/object-remote-node index 638b6bc..acdf165 100755 --- a/bin/object-remote-node +++ b/bin/object-remote-node @@ -3,6 +3,7 @@ use strictures 1; use Object::Remote::Connector::STDIO; use Object::Remote; +use CPS::Future; #$Object::Remote::Connection::DEBUG = 1; @@ -10,6 +11,12 @@ my $c = Object::Remote::Connector::STDIO->new->connect; my $loop = Object::Remote->current_loop; -$c->on_close(sub { $loop->stop }); +my $f = CPS::Future->new; + +$f->on_ready(sub { $loop->stop }); + +$c->on_close($f); + +print { $c->send_to_fh } "Shere\n"; $loop->run;