5faafc61898b0b894a907af98fca0d5cab57b21e
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / Turtles.pm
1 package Devel::REPL::Plugin::Turtles;
2 use Moose::Role;
3 use namespace::clean -except => [ 'meta' ];
4
5 around 'eval' => sub {
6     my $next = shift;
7     my ($self, $line) = @_;
8     if ($line =~ /^#(.*)/) {
9         return $next->($self, ('$REPL->' . $1 . '; return();'));
10     }
11     else {
12         return $next->($self, $line);
13     }
14     
15 };
16
17 1;