projects
/
p5sagit/Devel-REPL.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Added Plugin/NewlineHack, simple plugin to print a newline after output
[p5sagit/Devel-REPL.git]
/
lib
/
Devel
/
REPL
/
Plugin
/
Turtles.pm
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;