From a5d47b1ad425985a3bb7b08532207e89110f9daa Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 1 Jul 2013 21:25:08 -0400 Subject: allow tab completing after "$foo->" --- lib/Reply/Plugin/Autocomplete/Methods.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Reply/Plugin/Autocomplete/Methods.pm b/lib/Reply/Plugin/Autocomplete/Methods.pm index 19302ce..cd54d31 100644 --- a/lib/Reply/Plugin/Autocomplete/Methods.pm +++ b/lib/Reply/Plugin/Autocomplete/Methods.pm @@ -50,7 +50,9 @@ sub tab_handler { my ($line) = @_; my ($invocant, $method) = $line =~ /((?:\$\s*)?[A-Z_a-z][0-9A-Z_a-z:]*)->([A-Z_a-z][0-9A-Z_a-z]*)?$/; - return unless $method; + return unless $invocant; + + $method = '' unless defined $method; my $package; if ($invocant =~ /^\$/) { -- cgit v1.2.3-54-g00ecf