diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-10 02:13:25 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-10 02:13:25 -0400 |
commit | 99202371c7784d346cf43a4c25c64bb6d7630f10 (patch) | |
tree | d2a55982c2ff990ec6251a43ed421feb23818da8 /lib/Reply/Plugin/Autocomplete/Functions.pm | |
parent | 3db6d5dccb0b1fade69467e1800a8eb763bd3158 (diff) | |
download | reply-99202371c7784d346cf43a4c25c64bb6d7630f10.tar.gz reply-99202371c7784d346cf43a4c25c64bb6d7630f10.zip |
invert the sense of the package message too
Diffstat (limited to 'lib/Reply/Plugin/Autocomplete/Functions.pm')
-rw-r--r-- | lib/Reply/Plugin/Autocomplete/Functions.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Reply/Plugin/Autocomplete/Functions.pm b/lib/Reply/Plugin/Autocomplete/Functions.pm index 233ec4d..257cacf 100644 --- a/lib/Reply/Plugin/Autocomplete/Functions.pm +++ b/lib/Reply/Plugin/Autocomplete/Functions.pm @@ -28,6 +28,8 @@ sub tab_handler { my ($before, $fragment) = $line =~ /(.*?)(${module_name_rx}(::)?)$/; return unless $fragment; + my $current_package = ($self->publish('package'))[-1]; + my ($package, $func); if ($fragment =~ /:/) { ($package, $func) = ($fragment =~ /^(.+:)(\w*)$/); @@ -35,20 +37,14 @@ sub tab_handler { $package =~ s/:{1,2}$//; } else { - $package = $self->{'package'}; + $package = $current_package; $func = $fragment; } return - map { $package eq $self->{'package'} ? $_ : "$package\::$_" } + map { $package eq $current_package ? $_ : "$package\::$_" } grep { $func ? /^\Q$func/ : 1 } 'Package::Stash'->new($package)->list_all_symbols('CODE'); } -sub package { - my $self = shift; - my ($pkg) = @_; - $self->{'package'} = $pkg; -} - 1; |