Commit | Line | Data |
---|---|---|
e958cbc6 | 1 | package Devel::REPL::Plugin::Turtles; |
2 | use Moose::Role; | |
3 | ||
4 | around 'eval' => sub { | |
5 | my $next = shift; | |
6 | my ($self, $line) = @_; | |
7 | if ($line =~ /^#(.*)/) { | |
8 | return $next->($self, ('$self->' . $1 . '; return();')); | |
9 | } | |
10 | else { | |
11 | return $next->($self, $line); | |
12 | } | |
13 | ||
14 | }; | |
15 | ||
16 | 1; |