rl_basic_commands seems to be a Term::ReadLine::Perl or Term::ReadLine::Perl5 only thing.

You'll need to install one of them and according to Term::ReadLine doku's last paragraph set $ENV{PERL_RL}="Perl" prior² to use Term::ReadLine¹

As a side note: I had no problems yet just using Term::ReadLine::Gnu with tab completion.

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

¹) Term::ReadLine is kind of a wrapper module proxying to other Term::ReadLine:* modules

edit
s/Term::ReadLine::Perl/Term::ReadLine::Perl5/ ³

update

²) since use happens very early in compilation you'll most likely need to set the ENV within a BEGIN block.

(That's for sure a silly interface, Term::ReadLine should have a config option for the importer.)

update
³) both should work, but looking thru this Perl4 code with ' as package separator is aching my eyes...

update

looking into the source revealed the following line as fall back if PERL_RL is not found in %ENV

  eval "use Term::ReadLine::Gnu; 1" or eval "use Term::ReadLine::Perl; 1";

This means Term::ReadLine::Perl is only used by default if Term::ReadLine::Gnu wasn't found! Since you are using a T::RL::Perl* only feature you MUST set the env.

Maybe check with print $term->ReadLine; which module was loaded


In reply to Re: about Term::ReadLine and it's imported function by LanX
in thread about Term::ReadLine and it's imported function by Discipulus

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.