ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pdk
pdk
7.2 ReadLine problems
by Mike Gent other posts by this author
May 14 2008 3:13PM messages near this date
RE: 64-bit Windows compiling environment | RE: 7.2 ReadLine problems
I've mentioned Term::ReadLine problems on the list before but never
received an answer. Well now with Perl 5.10.0 and PDK 7.2, ReadLine is
completely broken. I'm running this under CentOS 5 Final.

If I take the example code from the docs, it works just fine as a
standalone script.

use Term::ReadLine;

my $term = new Term::ReadLine 'Simple Perl calc';
my $prompt = "Enter your arithmetic expression: ";
my $OUT = $term-> OUT || \*STDOUT;
while ( defined ($_ = $term-> readline($prompt)) ) {
  my $res = eval($_);
  warn $@ if $@;
  print $OUT $res, "\n" unless $@;
  $term-> addhistory($_) if /\S/;
}

Once perlapp'd, the first error is:

# ./read
Can't locate feature.pm in @INC (@INC contains: /tmp) at perlapp line
688.
BEGIN failed--compilation aborted at /</tmp/read> SelfLoader.pm line 3.
BEGIN failed--compilation aborted at /</tmp/read> SelfLoader.pm line 3.
BEGIN failed--compilation aborted at
/</tmp/read> Term/ReadLine/readline.pm line 2289.

Ok, not that I wanted to, but I added > >use feature ":5.10";<< to the
top. Then this is my problem:

# ./read
readline doesn't contain an __DATA__ token at
/</tmp/read> Term/ReadLine/readline.pm line 1438
_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Mike Gent
Jan Dubois
Mike Gent
Jan Dubois
Mike Gent
Paul J Brzezinski

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved