Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Term::Readline history

by shivangi (Initiate)
on Dec 03, 2013 at 04:44 UTC ( [id://1065370]=perlquestion: print w/replies, xml ) Need Help??

shivangi has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am using Term::Readline module, the addhistory method dosn't works on RHEL 6.3, it dosn't shows the history but it works on SLES. Why??

Replies are listed 'Best First'.
Re: Term::ReadLine history
by Athanasius (Archbishop) on Dec 03, 2013 at 08:03 UTC

    Hello shivangi,

    Even if the same version of the Term::ReadLine module is installed under each OS, its behaviour still depends on its local environment. So:

    • Check that the environment variable PERL_RL has the same value (if any) on both platforms.

    • Run perl -MTerm::ReadLine -we 'print Term::ReadLine->new()->ReadLine();' on both platforms and verify that the same ReadLine clone is loaded in each.

    • If it is (e.g. the output of the above command gives Term::ReadLine::Perl in both cases), check that the same version of this ReadLine clone is installed on each platform.

    Hope that helps,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Re: Term::Readline history
by taint (Chaplain) on Dec 03, 2013 at 06:46 UTC

    Did you, by chance compare versions, and their corresponding man pages, pod's for any differences between the two?

    --Chris

    #!/usr/bin/perl -Tw
    use Perl::Always or die;
    my $perl_version = (5.12.5);
    print $perl_version;
Re: Term::Readline history
by Anonymous Monk on Dec 03, 2013 at 05:53 UTC
    You didn't show code reproducing the problem. Why??
Re: Term::Readline history
by rockyb (Scribe) on Dec 03, 2013 at 22:31 UTC

    If you can't get Term::ReadLine::Gnu installed (perhaps you don't have the underlying GNU Readline installed or perhaps you don't have XS support), Term::Readline::Perl5 has the same history mechanism as Term::ReadLine::Gnu and it is pure Perl although it requires Term::ReadKey.

    Neither Term::ReadLine by itself nor Term::ReadLine::Perl have history. But again as the others in this thread have indicated, the setting of environment variable PERL_RL and what Perl modules you have installed in addition to Term::ReadLine e.g. Term::ReadLine::Gnu or Term::ReadLine::Perl5 matters here.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1065370]
Approved by boftx
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2024-04-23 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found