Subject: | substr outside of string when using zero-length prompt |
$ cat foo.pl
#!/usr/bin/perl -w
use strict;
use Term::ReadLine;
my $term = new Term::ReadLine "test";
print $term->ReadLine, "\n";
while (defined(my $expr = $term->readline(''))) {
print ">>> $expr <<<\n"
}
$ perl foo.pl
Term::ReadLine::Perl
substr outside of string at
/usr/lib/perl5/site_perl/5.8.5/Term/ReadLine/readline.pm line 1973.
Use of uninitialized value in length at
/usr/lib/perl5/site_perl/5.8.5/Term/ReadLine/readline.pm line 1785.
Use of uninitialized value in length at
/usr/lib/perl5/site_perl/5.8.5/Term/ReadLine/readline.pm line 1791.
Use of uninitialized value in substr at
/usr/lib/perl5/site_perl/5.8.5/Term/ReadLine/readline.pm line 1795.
Use of uninitialized value in length at
/usr/lib/perl5/site_perl/5.8.5/Term/ReadLine/readline.pm line 2046.