[Bast-commits] r4443 - in trunk/Devel-REPL: . lib/Devel/REPL/Plugin
lib/Devel/REPL/Plugin/CompletionDriver
Sartak at dev.catalyst.perl.org
Sartak at dev.catalyst.perl.org
Sat May 31 16:57:22 BST 2008
Author: Sartak
Date: 2008-05-31 16:57:22 +0100 (Sat, 31 May 2008)
New Revision: 4443
Modified:
trunk/Devel-REPL/
trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
trunk/Devel-REPL/lib/Devel/REPL/Plugin/FindVariable.pm
Log:
r61338 at onn: sartak | 2008-05-31 11:57:10 -0400
Fake $_REPL being in the lexical environment for some completion stuff
Property changes on: trunk/Devel-REPL
___________________________________________________________________
Name: svk:merge
- 08e7d58d-de06-4458-8c15-335e402ab116:/local/Devel-REPL:61093
6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local/bast/broken_internets/Devel-REPL:80567
+ 08e7d58d-de06-4458-8c15-335e402ab116:/local/Devel-REPL:61338
6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local/bast/broken_internets/Devel-REPL:80567
Modified: trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm 2008-05-31 08:44:25 UTC (rev 4442)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/CompletionDriver/LexEnv.pm 2008-05-31 15:57:22 UTC (rev 4443)
@@ -27,7 +27,7 @@
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;
Modified: trunk/Devel-REPL/lib/Devel/REPL/Plugin/FindVariable.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/FindVariable.pm 2008-05-31 08:44:25 UTC (rev 4442)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/FindVariable.pm 2008-05-31 15:57:22 UTC (rev 4443)
@@ -6,6 +6,8 @@
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} )
More information about the Bast-commits
mailing list