MozRepl-RemoteObject
view release on metacpan or search on metacpan
lib/MozRepl/RemoteObject.pm view on Meta::CPAN
my $rn = $options{repl}->repl;
$options{ json } ||= JSON->new->allow_nonref->ascii; # We talk ASCII
# Is this still true? It seems to be even when we find an UTF-8 safe
# transport above. This needs some investigation.
# Switch the Perl-repl to multiline input mode
# Well, better use a custom interactor and pass JSON messages that
# are self-delimited and contain no newlines. Newline for a new message.
# Switch the JS-repl to multiline input mode
$options{repl}->execute("$rn.setenv('inputMode','multiline');undefined;\n");
# Load the JS side of the JS <-> Perl bridge
my $c = $objBridge; # make a copy
$c =~ s/\[%\s+rn\s+%\]/$rn/g; # cheap templating
#warn $c;
$package->execute_command($c, %options);
$options{ functions } = {}; # cache
$options{ constants } = {}; # cache
( run in 1.859 second using v1.01-cache-2.11-cpan-140bd7fdf52 )