From: Gurusamy Sarathy Date: Sat, 17 Oct 1998 04:11:40 +0000 (+0000) Subject: silence -w noises (suggested by Greg Bacon) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ab1b4853ed375afa5dbf2299430175699d0452d;p=p5sagit%2Fp5-mst-13.2.git silence -w noises (suggested by Greg Bacon) p4raw-id: //depot/perl@2003 --- diff --git a/lib/Term/Complete.pm b/lib/Term/Complete.pm index 275aade..f26be77 100644 --- a/lib/Term/Complete.pm +++ b/lib/Term/Complete.pm @@ -13,8 +13,8 @@ Term::Complete - Perl word completion module =head1 SYNOPSIS - $input = complete('prompt_string', \@completion_list); - $input = complete('prompt_string', @completion_list); + $input = Complete('prompt_string', \@completion_list); + $input = Complete('prompt_string', @completion_list); =head1 DESCRIPTION @@ -74,6 +74,9 @@ CONFIG: { sub Complete { my($prompt, @cmp_list, $return, @match, $l, $test, $cmp, $r); + $return = ""; + $r = 0; + $prompt = shift; if (ref $_[0] || $_[0] =~ /^\*/) { @cmp_lst = sort @{$_[0]}; @@ -113,8 +116,8 @@ sub Complete { # (^U) kill $_ eq $kill && do { if ($r) { - undef $r; - undef $return; + $r = 0; + $return = ""; print("\r\n"); redo LOOP; }