From d7f1273b322e9fbb4483cb9e07ac1d0a687842ff Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 1 Jul 2013 21:50:50 -0400 Subject: avoid some undef warnings --- lib/Reply/Plugin/Autocomplete/Globals.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Reply/Plugin/Autocomplete/Globals.pm b/lib/Reply/Plugin/Autocomplete/Globals.pm index 1d043ff..99ab864 100644 --- a/lib/Reply/Plugin/Autocomplete/Globals.pm +++ b/lib/Reply/Plugin/Autocomplete/Globals.pm @@ -40,9 +40,10 @@ sub tab_handler { my @parts = split '::', $rest, -1; return if grep { /:/ } @parts; - return if $parts[0] =~ /^[0-9]/; + return if @parts && $parts[0] =~ /^[0-9]/; my $var_prefix = pop @parts; + $var_prefix = '' unless defined $var_prefix; my $stash_name = join('::', @parts); my $stash = eval { -- cgit v1.2.3-54-g00ecf