diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-10 01:13:42 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-10 01:13:42 -0400 |
commit | 7f6fda3414fe5ad689f6fd732a6cb1ca6078d1d0 (patch) | |
tree | 259512cb41a0275d62d6f8209135d6cbe5c9d511 /lib/Reply/Plugin/Autocomplete/Lexicals.pm | |
parent | 9ad70dd68d45203970fed6e7c2bdca13da13d8c4 (diff) | |
download | reply-7f6fda3414fe5ad689f6fd732a6cb1ca6078d1d0.tar.gz reply-7f6fda3414fe5ad689f6fd732a6cb1ca6078d1d0.zip |
let plugins query for this info, rather than always publishing it
Diffstat (limited to 'lib/Reply/Plugin/Autocomplete/Lexicals.pm')
-rw-r--r-- | lib/Reply/Plugin/Autocomplete/Lexicals.pm | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/Reply/Plugin/Autocomplete/Lexicals.pm b/lib/Reply/Plugin/Autocomplete/Lexicals.pm index 204778a..c733fed 100644 --- a/lib/Reply/Plugin/Autocomplete/Lexicals.pm +++ b/lib/Reply/Plugin/Autocomplete/Lexicals.pm @@ -20,22 +20,6 @@ Perl code. =cut -sub new { - my $class = shift; - - my $self = $class->SUPER::new(@_); - $self->{env} = []; - - return $self; -} - -sub lexical_environment { - my $self = shift; - my ($env) = @_; - - push @{ $self->{env} }, $env; -} - sub tab_handler { my $self = shift; my ($line) = @_; @@ -48,7 +32,7 @@ sub tab_handler { # these can't be lexicals return if $sigil eq '&' || $sigil eq '*'; - my $env = { map { %$_ } @{ $self->{env} } }; + my $env = { map { %$_ } $self->publish('lexical_environment') }; my @env = keys %$env; my @results; |