resolve rt.cpan#43807 three Completion drivers not loading Completion plugin
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / FindVariable.pm
index 4b9c012..9c06906 100644 (file)
@@ -1,11 +1,13 @@
 package Devel::REPL::Plugin::FindVariable;
 
-use Moose::Role;
+use Devel::REPL::Plugin;
 use namespace::clean -except => [ 'meta' ];
 
 sub find_variable {
     my ($self, $name) = @_;
 
+    return \$self if $name eq '$_REPL';
+
     # XXX: this code needs to live in LexEnv
     if ($self->can('lexical_environment')) {
         return \( $self->lexical_environment->get_context('_')->{$name} )
@@ -33,5 +35,9 @@ __END__
 
 Devel::REPL::Plugin::FindVariable - Finds variables by name
 
+=head1 AUTHOR
+
+Shawn M Moore, C<< <sartak at gmail dot com> >>
+
 =cut