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!", $@);
48 $ tinyrepl --plugin HintPersistence
52 tinyrepl is a minimal pure-Perl REPL. It is just a small wrapper
53 around L<Eval::WithLexicals>.
61 Loads a plugin into the REPL. See L<Eval::WithLexicals/with_plugins>.
67 Matt S. Trout <mst@shadowcat.co.uk>
71 David Leadbeater <dgl@dgl.cx>
75 Copyright (c) 2012 the Eval::WithLexicals L</AUTHOR> and L</CONTRIBUTORS>
80 This library is free software and may be distributed under the same terms