Click here to get back home

Term::ReadLine and ActivePerl

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Term::ReadLine and ActivePerl Johannes von Loewis 06-09-2006
Posted by Johannes von Loewis on June 9, 2006, 5:01 pm
Please log in for more thread options


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


Similar ThreadsPosted
ANNOUNCE: Zoidberg 0.90 && Term::ReadLine::Zoid 0.05 September 6, 2004, 7:03 pm
Term::ReadLine - Terminal does not support AddHistory June 14, 2005, 12:54 pm
Term::Clui in modlist/User_Interfaces/Term ? October 5, 2007, 1:52 am
Trouble with readline in cpan, perl debug on Mac OS X September 9, 2004, 6:49 pm
Question about Term::ANSIMenu November 2, 2004, 2:55 am
Can't install Term::ReadKey December 16, 2004, 3:47 pm
Term::ReadKey for VMS platform July 25, 2008, 11:45 am
Term-Size make fails on debian September 6, 2005, 4:28 pm
Term::ProgressBar problems with multiple calls November 16, 2004, 4:46 pm
Term::Cap -- Setting terminal type under Windows XP May 24, 2006, 1:46 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap