Commit | Line | Data |
---|---|---|
9e72f0cf | 1 | package Object::Remote::Connector::Local; |
2 | ||
3 | use IPC::Open2; | |
4 | use Object::Remote::Connection; | |
5 | use Moo; | |
6 | ||
7 | sub connect { | |
8 | # XXX bin/ is wrong but meh, fix later | |
9 | my $pid = open2(my $its_stdin, my $its_stdout, 'bin/object-remote-node') | |
10 | or die "Couldn't start local node: $!"; | |
11 | Object::Remote::Connection->new( | |
12 | send_to_fh => $its_stdin, | |
13 | receive_from_fh => $its_stdout, | |
14 | child_pid => $pid | |
15 | ); | |
16 | } | |
17 | ||
18 | 1; |