INET connector
[scpubgit/Object-Remote.git] / lib / Object / Remote / Connector / Local.pm
index 33f599f..6119e3f 100644 (file)
@@ -1,18 +1,18 @@
 package Object::Remote::Connector::Local;
 
-use IPC::Open2;
-use Object::Remote::Connection;
 use Moo;
 
-sub connect {
-  # XXX bin/ is wrong but meh, fix later
-  my $pid = open2(my $its_stdin, my $its_stdout, 'bin/object-remote-node')
-    or die "Couldn't start local node: $!";
-  Object::Remote::Connection->new(
-    send_to_fh => $its_stdin,
-    receive_from_fh => $its_stdout,
-    child_pid => $pid
-  );
-}
+with 'Object::Remote::Role::Connector::PerlInterpreter';
+
+no warnings 'once';
+
+BEGIN {  }
+
+push @Object::Remote::Connection::Guess, sub {
+  if (($_[0]||'') eq '-') {
+      shift(@_);
+      __PACKAGE__->new(@_);
+  }
+};
 
 1;