X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FFindVariable.pm;h=9c06906649ab8e6df1c4df7059b774556575b5d1;hp=ef6314a9e42a568eda071eee963c90b641acffb4;hb=9c4fddb350dfc5c966414fa8ce43afce323573a8;hpb=30b459d4fbeb6f2406a3013c7cbcc46a6d0ccf0d diff --git a/lib/Devel/REPL/Plugin/FindVariable.pm b/lib/Devel/REPL/Plugin/FindVariable.pm index ef6314a..9c06906 100644 --- a/lib/Devel/REPL/Plugin/FindVariable.pm +++ b/lib/Devel/REPL/Plugin/FindVariable.pm @@ -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} )