4 use Eval::WithLexicals;
10 "plugin=s" => \my @plugins
13 $SIG{INT} = sub { warn "SIGINT\n" };
15 { package Data::Dumper; no strict 'vars';
16 $Terse = $Indent = $Useqq = $Deparse = $Sortkeys = 1;
21 ? Eval::WithLexicals->with_plugins(@plugins)->new
22 : Eval::WithLexicals->new;
24 my $read = Term::ReadLine->new('Perl REPL');
26 my $line = $read->readline('re.pl$ ');
27 exit unless defined $line;
29 local $SIG{INT} = sub { die "Caught SIGINT" };
30 @ret = $eval->eval($line); 1;
31 } or @ret = ("Error!", $@);