Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I have been seeing the following, for the past 18 months, every time I use the cpan utility:

$ cpan Terminal does not support AddHistory. To fix that, maybe try> install Term::ReadLine::Perl cpan shell -- CPAN exploration and modules installation (v2.28) Enter 'h' for help. cpan[1]>

I looked into that briefly (and unsuccessfully) several times; in general, whatever I wanted to install via cpan was more important than AddHistory, which I only use infrequently anyway, so it ended up on my TODO list.

I tried with the suggested module, Term::ReadLine::Perl, as well as a variety of others including: Term::ReadLine::Perl5, Term::ReadLine::Gnu, and Term::ReadLine::Tiny. These all failed, the most common problem being the process hanging when the Term::ReadKey dependency was being installed. Actually, installation of Term::ReadLine::Tiny worked fine but it didn't provide AddHistory.

I spent some hours this morning looking into this and eventually came up with a solution. My basic Perl setup is: Win10 - Cygwin - Perlbrew - Perl 5.32.0. If you're experiencing the same problem, this solution may work for you: I can't make any guarantees as I don't have other systems on which to test this.

The only thing that worked was a completely manual installation.

Download https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz then run the familiar incantation:

$ tar zxvf TermReadKey-2.38.tar.gz $ cd TermReadKey-2.38 $ perl Makefile.PL $ make $ make test $ make install

Download https://cpan.metacpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.37.tar.gz then a very similar incantation:

$ tar zxvf Term-ReadLine-Gnu-1.37.tar.gz $ cd Term-ReadLine-Gnu-1.37 $ perl Makefile.PL $ make $ make test $ make install

Now I get:

$ cpan cpan shell -- CPAN exploration and modules installation (v2.28) Enter 'h' for help. cpan[1]>

and moving through the command history and editing is now possible.

If you were experiencing similar problems with a different setup to me — and found this worked as is, worked after some modification, or failed abysmally — please leave a note for the next reader.

— Ken


In reply to cpan: Terminal does not support AddHistory. by kcott

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-18 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found