5.8 also requires extra C3 bits
[scpubgit/Object-Remote.git] / lib / Object / Remote / Node.pm
CommitLineData
eee9a548 1package Object::Remote::Node;
2
3use strictures 1;
4use Object::Remote::Connector::STDIO;
5use Object::Remote;
6use CPS::Future;
7
8sub run {
9
10 my $c = Object::Remote::Connector::STDIO->new->connect;
11
12 $c->register_class_call_handler;
13
14 $c->ready_future->done;
15
16 my $loop = Object::Remote->current_loop;
17
18 my $f = CPS::Future->new;
19
20 $f->on_ready(sub { $loop->want_stop });
21
22 $c->on_close($f);
23
24 print { $c->send_to_fh } "Shere\n";
25
26 $loop->want_run;
27 $loop->run_while_wanted;
28}
29
301;