X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FObject%2FRemote%2FNode.pm;h=027097cf285d44ee57a8266137aa37a767e48746;hb=9031635d18e754da303557b656c63ce8e7eb8e77;hp=dc2563c717e3659411fcbb2d2e4b82159eb70613;hpb=12fb4a80d68ad14c18a35f60cc6d8a671f728ac9;p=scpubgit%2FObject-Remote.git diff --git a/lib/Object/Remote/Node.pm b/lib/Object/Remote/Node.pm index dc2563c..027097c 100644 --- a/lib/Object/Remote/Node.pm +++ b/lib/Object/Remote/Node.pm @@ -2,22 +2,30 @@ package Object::Remote::Node; use strictures 1; use Object::Remote::Connector::STDIO; +use Object::Remote::Logging qw(:log :dlog); use Object::Remote; use CPS::Future; sub run { + log_trace { "run() has been invoked on remote node" }; my $c = Object::Remote::Connector::STDIO->new->connect; $c->register_class_call_handler; my $loop = Object::Remote->current_loop; - $c->on_close->on_ready(sub { $loop->want_stop }); + $c->on_close->on_ready(sub { + log_info { "Node connection with call handler has closed" }; + $loop->want_stop + }); + Dlog_trace { "Node is sending 'Shere' to $_" } $c->send_to_fh; print { $c->send_to_fh } "Shere\n"; + log_debug { "Node is going to start the run loop" }; $loop->want_run; $loop->run_while_wanted; + log_debug { "Run loop invocation in node has completed" }; } 1;