Actually, the bug can be demonstrated with the following script:
#!/usr/bin/perl -w
use strict;
use lib ".";
use Term::Complete;
$_ = "Foo";
my @completion_list;
my $input = Complete('Hit Enter', \@completion_list);
print "$_\n";
Now, here's the patch that fixes the problem.
--- /usr/libdata/perl5/Term/Complete.pm Fri Sep 17 13:09:30 2004
+++ ./Term/Complete.pm Fri Nov 26 11:13:08 2004
@@ -5,7 +5,7 @@
use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw(Complete);
-our $VERSION = '1.401';
+our $VERSION = '1.402';
# @(#)complete.pl,v1.2 (me@anywhere.EBay.Sun.COM) 09/23/91
@@ -113,6 +113,7 @@
}
system $tty_raw_noecho if defined $tty_raw_noecho;
LOOP: {
+ local $_;
print($prompt, $return);
while (($_ = getc(STDIN)) ne "\r") {
CASE: {
Thread Previous
|
Thread Next