summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/Autocomplete/Methods.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-10 01:13:42 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-10 01:13:42 -0400
commit7f6fda3414fe5ad689f6fd732a6cb1ca6078d1d0 (patch)
tree259512cb41a0275d62d6f8209135d6cbe5c9d511 /lib/Reply/Plugin/Autocomplete/Methods.pm
parent9ad70dd68d45203970fed6e7c2bdca13da13d8c4 (diff)
downloadreply-7f6fda3414fe5ad689f6fd732a6cb1ca6078d1d0.tar.gz
reply-7f6fda3414fe5ad689f6fd732a6cb1ca6078d1d0.zip
let plugins query for this info, rather than always publishing it
Diffstat (limited to 'lib/Reply/Plugin/Autocomplete/Methods.pm')
-rw-r--r--lib/Reply/Plugin/Autocomplete/Methods.pm10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/Reply/Plugin/Autocomplete/Methods.pm b/lib/Reply/Plugin/Autocomplete/Methods.pm
index b643fb2..35de87e 100644
--- a/lib/Reply/Plugin/Autocomplete/Methods.pm
+++ b/lib/Reply/Plugin/Autocomplete/Methods.pm
@@ -26,19 +26,11 @@ sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
- $self->{env} = [];
$self->{package} = 'main';
return $self;
}
-sub lexical_environment {
- my $self = shift;
- my ($env) = @_;
-
- push @{ $self->{env} }, $env;
-}
-
sub package {
my $self = shift;
my ($package) = @_;
@@ -61,7 +53,7 @@ sub tab_handler {
if ($invocant =~ /^\$/) {
# XXX should support globals here
my $env = {
- map { %$_ } @{ $self->{env} },
+ map { %$_ } $self->publish('lexical_environment'),
};
my $var = $env->{$invocant};
return unless $var && ref($var) eq 'REF' && blessed($$var);