Term::ReadLine and ActivePerl

Term::ReadLine and ActivePerl

am 09.06.2006 23:01:29 von Johannes

In Cygwin the readline() call in the following script

#!/usr/bin/perl
use Term::ReadLine;
use strict;
use warnings;

my $term = new Term::ReadLine 'whatever';
print "term=$term\n";
my $foo = $term->readline("edit: ", "initstring");
print "$foo\n";

gives me "initstring" as the initial value of the string to be edited
(displayed after the "edit: " prompt).

With ActivePerl I only get the prompt and an _empty_ string to edit.
I whish I knew how to change that.

(In the following snippets I press ENTER after the prompt.)

####################with ActivePerl###################################
C:\home\loewjoha\Perl\rltest>perl rltest2.pl
term=Term::ReadLine::Perl=ARRAY(0x1aaa728)
edit:

C:\home\loewjoha\Perl\rltest>perl --version

This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 25 registered patches, see perl -V for more detail)

Copyright 1987-2006, Larry Wall

Binary build 817 [257965] provided by ActiveState
http://www.ActiveState.com
Built Mar 20 2006 17:54:25

[...]

C:\home\loewjoha\Perl\rltest>echo %PERL_RL%
%PERL_RL%
##########################End ActivePerl###########################

In Cygwin on the same box (which is running W2k) I get with
Term::ReadLine::Gnu as well as with Term::ReadLine:Perl and the script
above:

###################Cygwin################################### ########
~/Perl/rltest$ ./rltest2.pl
term=Term::ReadLine=HASH(0x100b7c64)

edit: initstring
initstring
~/Perl/rltest$ echo $PERL_RL

~/Perl/rltest$ export PERL_RL=Perl
~/Perl/rltest$ ./rltest2.pl
term=Term::ReadLine::Perl=ARRAY(0x10093b68)
edit: initstring
initstring
~/Perl/rltest$ perl --version

This is perl, v5.8.7 built for cygwin-thread-multi-64int
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2005, Larry Wall
[...]

~/Perl/rltest$ uname -a
CYGWIN_NT-5.0 lev-0002 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
######################Ende Cygwin###################################

Thanks

Johannes