X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FTurtles.pm;fp=lib%2FDevel%2FREPL%2FPlugin%2FTurtles.pm;h=5faafc61898b0b894a907af98fca0d5cab57b21e;hp=dbc73226b8dd7fb493c3d7a3052db2327df19135;hb=48ddfeae8a9840b39113a97c4889bfe210509cdd;hpb=f254750a4425f47eca1923f7e44b3b53b3c71104 diff --git a/lib/Devel/REPL/Plugin/Turtles.pm b/lib/Devel/REPL/Plugin/Turtles.pm index dbc7322..5faafc6 100644 --- a/lib/Devel/REPL/Plugin/Turtles.pm +++ b/lib/Devel/REPL/Plugin/Turtles.pm @@ -1,11 +1,12 @@ package Devel::REPL::Plugin::Turtles; use Moose::Role; +use namespace::clean -except => [ 'meta' ]; around 'eval' => sub { my $next = shift; my ($self, $line) = @_; if ($line =~ /^#(.*)/) { - return $next->($self, ('$self->' . $1 . '; return();')); + return $next->($self, ('$REPL->' . $1 . '; return();')); } else { return $next->($self, $line); @@ -13,4 +14,4 @@ around 'eval' => sub { }; -1; \ No newline at end of file +1;