Arrow up and down does not work any more in Perl debugger and CPAN client
Following on from the answers from LeoNerd and Hakon :- On CentOS 7 I had to run
sudo yum install perl-Term-ReadLine-Gnu
to install the module. Now the arrow keys work in perl -d
If you want to avoid installing additional OS libraries (or need to because you don't have root/sudo) you can just use CPAN to grab one of these two Perl implementations of Readline:
- Term::ReadLine::Perl (Perl implementation of Readline libraries)
- Term::Readline::Zoid (Pure Perl implementation of Readline libraries)
It's especially handy if you already have your own local Perl install (eg, using Perlbrew).
By default the only Term::ReadLine
handler you get is Term::ReadLine::Perl
which is quite simple and doesn't understand things like arrow keys. You probably want to install Term::ReadLine::Gnu
.