Term::ReadKey not working on one linux box

M

Martin Mohr

Hello,

I'm having a problem with Term::ReadKey, which works fine everywhere
except on one of my Linux boxes (Suse 8.2). I am aware that this is
probably a wrong setting somewhere in the OS and not a real perl
problem, but I have no idea, so I'm asking here.

###############
#!/usr/bin/perl

use strict;
use Term::ReadKey;

ReadMode('cbreak');
while (not ReadKey(-1)) {}
ReadMode('normal');
###############

For some reason, this doesn't receive any keystrokes on one of my
computers (equipped with "ReadKey.pm,v 2.23 2005/01/11 21:16:31
jonathan" as everywhere else).

Making a ssh connection from this computer to another one, and executing
the script there works. Connecting from the working machine to the
broken machine and executing the script doesn't work. On the broken
machine it works neither in kde nor the plain terminal.

Does anyone have an idea please?

Thanks a lot,
Martin
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was sent to
Martin Mohr
....
For some reason, this doesn't receive any keystrokes on one of my
computers (equipped with "ReadKey.pm,v 2.23 2005/01/11 21:16:31
jonathan" as everywhere else).

Making a ssh connection from this computer to another one, and executing
the script there works. Connecting from the working machine to the
broken machine and executing the script doesn't work. On the broken
machine it works neither in kde nor the plain terminal.

Does anyone have an idea please?

One possibility: Perl (and TRK) were not compiled on this particular
machine, but compiled somewhere else. This "somewhere else" package
is broken (as most out-of-site-compiled pieces of software on Unix
are).

Hope this helps,
Ilya
 
M

Martin Mohr

Ilya said:
One possibility: Perl (and TRK) were not compiled on this particular
machine, but compiled somewhere else. This "somewhere else" package
is broken (as most out-of-site-compiled pieces of software on Unix
are).

Term::ReadKey has been compiled on the respective machines. Perl itself
not, but I have never compiled a perl myself. I don't want to sound
ungraceful, but how likely can this be the cause? Do you have an idea
for another test before I try to recompile perl and mess up the rest of
my system?

Thanks,
Martin
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was sent to
Martin Mohr
Term::ReadKey has been compiled on the respective machines. Perl itself
not, but I have never compiled a perl myself. I don't want to sound
ungraceful, but how likely can this be the cause?

Depends on how many alternative ways of action you have, does not it?
Myself, I won't TOUCH a perl compiled on another Unix machine - too
much time will be spend chasing what I would think are bugs in MY code.
Do you have an idea for another test before I try to recompile perl

Recompiling Perl requires about 2min of human intervention. (Much less
than for me to write this message.)
and mess up the rest of my system?

There is no need to mess your system until you know whether it solves
your problems. Uninstalled Perl can still be used to test extensions.
Just

env PERL5LIB=.../lib .../perl ARGS

(LD LOAD PATH should also be set - see how `make test' does it).

Hope this helps,
Ilya
 
M

Martin Mohr

Ilya said:
One possibility: Perl (and TRK) were not compiled on this particular
machine, but compiled somewhere else. This "somewhere else" package
is broken (as most out-of-site-compiled pieces of software on Unix
are).

Hello again,

I contacted the maintainer of Term::ReadKey, Jonathan Stowe, who was
very helpful. Indeed you were right and my scepticism was wrong. It was
a problem of the pre-installed perl 5.8.0. So I compiled and installed
5.8.8 side-by-side with the old perl. It was as easy as you promised and
everything works fine now! Thank you very much!

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top