From: Matt S Trout Date: Fri, 18 May 2012 15:12:28 +0000 (+0000) Subject: search sensibly for the object-remote-node script X-Git-Tag: v0.001001~52 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=beaee5a1ec2d8d70222163de995aa99adff0f052;p=scpubgit%2FObject-Remote.git search sensibly for the object-remote-node script --- diff --git a/Makefile.PL b/Makefile.PL index 7dcccb6..c5e8f75 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,4 +13,5 @@ WriteMakefile( 'JSON::PP' => 0, 'CPS::Future' => 0, }, + EXE_FILES => [ 'bin/object-remote-node' ], ); diff --git a/lib/Object/Remote/Connector/Local.pm b/lib/Object/Remote/Connector/Local.pm index 72a153f..2064ac6 100644 --- a/lib/Object/Remote/Connector/Local.pm +++ b/lib/Object/Remote/Connector/Local.pm @@ -6,7 +6,11 @@ use Moo; with 'Object::Remote::Role::Connector'; sub _open2_for { - # XXX bin/ is wrong but meh, fix later + my $open_this = ( + -d 't' && -e 'bin/object-remote-node' + ? 'bin/object-remote-node' + : 'object-remote-node' + ); my $pid = open2(my $its_stdout, my $its_stdin, 'bin/object-remote-node') or die "Couldn't start local node: $!"; return ($its_stdin, $its_stdout, $pid);