BuildAll and DemolishAll are loaded on first ->new so need to be explicitly packed
Matt S Trout [Tue, 26 Jun 2012 16:46:02 +0000 (16:46 +0000)]
lib/Object/Remote/Connector/STDIO.pm
lib/Object/Remote/FatNode.pm
lib/Object/Remote/Role/Connector/PerlInterpreter.pm

index adca748..ee34319 100644 (file)
@@ -1,6 +1,7 @@
 package Object::Remote::Connector::STDIO;
 
 use File::Spec;
+use IO::Handle;
 use Object::Remote::Connection;
 use Moo;
 
index e0a0351..9f94ee2 100644 (file)
@@ -25,6 +25,8 @@ my $command = qq(
   -mClass::C3
   -mObject::Remote::ModuleLoader
   -mObject::Remote::Node
+  -mMethod::Generate::BuildAll
+  -mMethod::Generate::DemolishAll
   -mJSON::PP
   -e 'print join "\\n", reverse \%INC'
 );
index d7d583c..312ee4c 100644 (file)
@@ -1,6 +1,7 @@
 package Object::Remote::Role::Connector::PerlInterpreter;
 
 use IPC::Open2;
+use IO::Handle;
 use Object::Remote::ModuleSender;
 use Object::Remote::Handle;
 use Scalar::Util qw(blessed);
@@ -43,6 +44,7 @@ sub _start_perl {
 sub _open2_for {
   my $self = shift;
   my ($foreign_stdin, $foreign_stdout, $pid) = $self->_start_perl(@_);
+  $foreign_stdin->autoflush(1);
   print $foreign_stdin 'BEGIN { $ENV{OBJECT_REMOTE_DEBUG} = 1 }'."\n"
     if $ENV{OBJECT_REMOTE_DEBUG};
   print $foreign_stdin $self->fatnode_text