diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-04 14:21:11 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-04 14:21:11 -0400 |
commit | 48656ef560302c9e9864b84b2f95f266799d88e3 (patch) | |
tree | 0a440ed17b463af617af486e5c06a5ea3bc84818 /lib/Reply/Plugin/Autocomplete/Methods.pm | |
parent | da780b4a0c9459fb887bd32159c004312d9f3934 (diff) | |
download | reply-48656ef560302c9e9864b84b2f95f266799d88e3.tar.gz reply-48656ef560302c9e9864b84b2f95f266799d88e3.zip |
just give up on the whole 'name' thing here
Diffstat (limited to 'lib/Reply/Plugin/Autocomplete/Methods.pm')
-rw-r--r-- | lib/Reply/Plugin/Autocomplete/Methods.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Reply/Plugin/Autocomplete/Methods.pm b/lib/Reply/Plugin/Autocomplete/Methods.pm index 151caa0..d4319b2 100644 --- a/lib/Reply/Plugin/Autocomplete/Methods.pm +++ b/lib/Reply/Plugin/Autocomplete/Methods.pm @@ -28,7 +28,7 @@ sub new { my $class = shift; my $self = $class->SUPER::new(@_); - $self->{env} = {}; + $self->{env} = []; $self->{package} = 'main'; return $self; @@ -36,9 +36,9 @@ sub new { sub lexical_environment { my $self = shift; - my ($name, $env) = @_; + my ($env) = @_; - $self->{env}{$name} = $env; + push @{ $self->{env} }, $env; } sub package { @@ -63,8 +63,7 @@ sub tab_handler { if ($invocant =~ /^\$/) { # XXX should support globals here my $env = { - (map { %$_ } values %{ $self->{env} }), - (%{ $self->{env}{defaults} || {} }), + map { %$_ } @{ $self->{env} }, }; my $var = $env->{$invocant}; return unless $var && ref($var) eq 'REF' && blessed($$var); |