Subject: | Term::ReadKey trouble on Win32 Vanilla Perl. |
Installed Term::ReadKey through the CPAN shell as part of my attempts to
gradually get Bundle::CPAN working.
Built ok, tests went a little funny when I could exit one of the tests,
had to force my way out of it, but things still seemed to go ok.
After installation, every time I start up the debugger or CPAN shell I
get something like the following.
-------------------------------------------------------
C:\DOCUME~1\adam\LOCALS~1\Temp\cpan\build\CPAN-1.86>perl -de 1
Loading DB routines from perl5db.pl version 1.28
Editor support available.
Enter h or `h h' for help, or `perldoc perldebug' for more help.
main::(-e:1): 1
MYDEBUGGING: Setting mode '' (4)
MYDEBUGGING: Normalised handle
MYDEBUGGING: SetReadMode( 4, GLOB(0x9852e0) )
SetConsoleMode failed, LastError=|6| at
c:/vanilla-perl/perl/site/lib/Term/ReadK
ey.pm line 267.
at c:/vanilla-perl/perl/site/lib/Term/ReadLine/readline.pm line 1415
readline::readline(' DB<1> ') called at
c:/vanilla-perl/perl/site/lib/T
erm/ReadLine/Perl.pm line 11
Term::ReadLine::Perl::readline('Term::ReadLine::Perl=ARRAY(0xaabf7c)', '
DB<1> ') called at c:/vanilla-perl/perl/lib/perl5db.pl line 6367
DB::readline(' DB<1> ') called at
c:/vanilla-perl/perl/lib/perl5db.pl l
ine 2203
DB::DB called at -e line 1
DB<1>
---------------------------------------------------------
The MYDEBUGGING lines did not change the error, and were the result of
just some print statements I inserted in ReadMode.
----------------------------------------------------------
sub ReadMode
{
my ($mode) = $modes{ $_[0] };
print "MYDEBUGGING: Setting mode '$mode' ($_[0])\n";
my ($fh) = normalizehandle( ( @_ > 1 ? $_[1] : \*STDIN ) );
print "MYDEBUGGING: Normalised handle\n";
if ( defined($mode) ) { print "MYDEBUGGING: SetReadMode( $mode, $fh
)\n"; SetReadMode( $mode, $fh ) }
elsif ( $_[0] =~ /^\d/ ) { print "MYDEBUGGING: SetReadMode( $_[0],
$fh )\n"; SetReadMode( $_[0], $fh ) }
else { croak("Unknown terminal mode `$_[0]'"); }
}
---------------------------------------------------------
Since I don't see SetReadMode mentioned anywhere else in the file, I'm
assuming that it is implemented in XS/C.