add LexEnv plugin, rename $REPL to $_REPL to avoid clash with Lexical::Persistence
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / Turtles.pm
CommitLineData
e958cbc6 1package Devel::REPL::Plugin::Turtles;
2use Moose::Role;
48ddfeae 3use namespace::clean -except => [ 'meta' ];
e958cbc6 4
5around 'eval' => sub {
6 my $next = shift;
7 my ($self, $line) = @_;
8 if ($line =~ /^#(.*)/) {
85cd2780 9 return $next->($self, ('$_REPL->' . $1 . '; return();'));
e958cbc6 10 }
11 else {
12 return $next->($self, $line);
13 }
14
15};
16
48ddfeae 171;