Devel-IPerl
view release on metacpan or search on metacpan
lib/Devel/IPerl/Kernel/Backend/DevelREPL.pm view on Meta::CPAN
sub _build_repl {
my ($self) = @_;
require Devel::REPL;
$log->trace('Creating REPL: Devel::REPL');
my $repl = Devel::REPL->new;
my $term = Devel::IPerl::ReadLine::String->new;
$repl->term( $term );
Moo::Role->apply_roles_to_object($repl, 'Devel::IPerl::ReadLine::Role::DevelREPL');
# Devel::REPL::Plugin::LexEnv
$repl->load_plugin('LexEnv');
# Devel::REPL::Plugin::OutputCache
$repl->load_plugin('OutputCache');
# Devel::REPL::Plugin::Completion, etc.
$repl->load_plugin('Completion');
$repl->no_term_class_warning(1);
# Plugin::Completion
# do not warn that the ReadLine is not isa
# Term::ReadLine::Gnu or Term::ReadLine::Perl
$repl->load_plugin($_) for (
'CompletionDriver::Keywords', # substr, while, etc
'CompletionDriver::LexEnv', # current environment
'CompletionDriver::Globals', # global variables
'CompletionDriver::INC', # loading new modules
lib/Devel/IPerl/Kernel/Backend/Reply.pm view on Meta::CPAN
$exec_result->exception_traceback( [$exception] );
}
if( $status_ok ) {
$exec_result->status_ok; # TODO
}
$exec_result;
}
# taken/modified from Devel::REPL::Plugin::MultiLine::PPI
sub is_complete {
my ($self, $code) = @_;
require PPI::Document;
# add this so we can test whether the document ends in PPI::Statement::Null
$code .= "\n;;";
my $document = PPI::Document->new(\$code);
return 1 if !defined($document);
( run in 0.359 second using v1.01-cache-2.11-cpan-4ee56698ea0 )