Added ReadlineHistory plugin - does history using readline directly
[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 =~ /^#(.*)/) {
48ddfeae 9 return $next->($self, ('$REPL->' . $1 . '; return();'));
e958cbc6 10 }
11 else {
12 return $next->($self, $line);
13 }
14
15};
16
48ddfeae 171;