diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-01 21:50:50 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-01 21:50:50 -0400 |
commit | d7f1273b322e9fbb4483cb9e07ac1d0a687842ff (patch) | |
tree | b6d66ad8d2ca21378aa4b1a40753fb0fe1e879e7 | |
parent | cad6d9c60381336517831443f1fbec69ff498fb0 (diff) | |
download | reply-d7f1273b322e9fbb4483cb9e07ac1d0a687842ff.tar.gz reply-d7f1273b322e9fbb4483cb9e07ac1d0a687842ff.zip |
avoid some undef warnings
-rw-r--r-- | lib/Reply/Plugin/Autocomplete/Globals.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |