0

I have one saved session in PuTTy (connecting to a RHEL box) where perl -d and the arrow keys works very nice.

I have the same PuTTy version, and using session1, I cloned to connect to a different but similar RHEL box and the arrows does not work?

According to This question, session1 should have also not been working as I do not have Term::ReadLine::Gnu on that first box

Community
  • 1
  • 1
lzc
  • 919
  • 7
  • 16

1 Answers1

2

You don't necessarily need Term::ReadLine::Gnu, other modules may fill the same need. I use Term::ReadLine::Perl. You may have that module (or another equivalent) installed on the first box but not on the second.

The linked answer claims that Term::ReadLine::Perl does not have arrow-key support, which may have been true at one time, but arrow keys work fine for me.

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
  • Hmm, you seem to be right, though I had an error even on the first box with `perl -MTerm::ReadLine::Perl` throwing an error... but checking on the 2nd box the error certainly says `Can't locate Term/ReadLine/Perl.pm in @INC ....` Lemme try to install on the 2nd box. Thanks @DanLowe – lzc Oct 27 '15 at 19:37
  • YES! I installed it and it works, only I'm getting an error if I just `perl -MTerm::ReadLine::Perl` getting `Can't locate object method "Features" via package "Term::ReadLine::Stub" at ...` still `perl -d` works. I wonder what I'm missing from the **Features** ? – lzc Oct 29 '15 at 14:41
  • 2
    It's because `Term::ReadLine::Stub` is not installed. Reading over the code in `Term/ReadLine/Perl.pm` it seems like it tries to use 3 parent classes if they are installed, but if not it just keeps going. This is some older hard-to-read code so I'm not sure how it works, but it seems to work fine without that Stub module... *shrug* I don't have `Term::ReadLine::Stub` installed either, and it works fine. – Dan Lowe Oct 29 '15 at 15:07