Fake $_REPL being in the lexical environment for some completion stuff
git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4443
bd8105ee-0ff8-0310-8827-fb3f25b6796d
map { $sigil eq '%' ? '%' . $_ : $_ }
grep { /$re/ }
map { substr($_, 1) } # drop lexical's sigil
- keys %{$self->lexical_environment->get_context('_')};
+ '$_REPL', keys %{$self->lexical_environment->get_context('_')};
};
1;
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} )