rejig to provide $REPL instead of $self, fix namespace::clean usage to not nuke meta
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / Turtles.pm
index dbc7322..5faafc6 100644 (file)
@@ -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;