Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: about Term::ReadLine and it's imported functionby LanX (Saint) |
on Nov 24, 2014 at 13:31 UTC ( [id://1108256]=note: print w/replies, xml ) | Need Help?? |
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
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...
updatelooking 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 Section
Seekers of Perl Wisdom
|
|