6 has world => (is => 'ro', required => 1);
8 has remote => (is => 'lazy');
10 sub _build_remote { shift->world->remote_for('EVAL') }
13 my $remote = $_[0]->remote;
14 my $read = Term::ReadLine->new('REPL');
17 my $line = $read->readline('re.pl$ ');
18 last unless defined $line;
19 next unless length $line;
20 my @reply = $remote->blocking_request(eval => $line);
21 if ($reply[0] eq 'MISTAKE') {
22 die "Botch: ".join(': ', @reply[1,2]);
27 chomp($ret->{stdout});
28 print "STDOUT:\n${\$ret->{stdout}}\n";
31 chomp($ret->{stderr});
32 print "STDERR:\n${\$ret->{stderr}}\n";