remoting works
[scpubgit/Object-Remote.git] / lib / Object / Remote / Connector / Local.pm
CommitLineData
9e72f0cf 1package Object::Remote::Connector::Local;
2
3use IPC::Open2;
9e72f0cf 4use Moo;
5
47c83a13 6with 'Object::Remote::Role::Connector';
7
8sub _open2_for {
9e72f0cf 9 # XXX bin/ is wrong but meh, fix later
ad4f54b2 10 my $pid = open2(my $its_stdout, my $its_stdin, 'bin/object-remote-node')
9e72f0cf 11 or die "Couldn't start local node: $!";
47c83a13 12 return ($its_stdin, $its_stdout, $pid);
9e72f0cf 13}
14
84b04178 15push @Object::Remote::Connection::Guess, sub {
16 if (($_[0]||'') eq '-') { __PACKAGE__->new->connect }
17};
18
9e72f0cf 191;