From 6029c1b8994b3f4757f6450cc69bbe2454c2d8be Mon Sep 17 00:00:00 2001 From: Kosuke Asami Date: Thu, 18 Jul 2013 17:11:20 +0900 Subject: readline: fix a bug that can't handle correct ReadLine class simple mistake ... sorry --- lib/Reply/Plugin/ReadLine.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Reply/Plugin/ReadLine.pm b/lib/Reply/Plugin/ReadLine.pm index 18c944b..397aefe 100644 --- a/lib/Reply/Plugin/ReadLine.pm +++ b/lib/Reply/Plugin/ReadLine.pm @@ -51,7 +51,7 @@ sub new { $readline::rl_scroll_nextline = 0; } - if ($self->{term}->ReadLine eq ('Term::ReadLine::Gnu' or 'Term::ReadLine::Perl5')) { + if (($self->{term}->ReadLine eq 'Term::ReadLine::Gnu') || ($self->{term}->ReadLine eq 'Term::ReadLine::Perl5')) { $self->{term}->StifleHistory($opts{history_length}) if defined $opts{history_length} && $opts{history_length} >= 0; } @@ -86,7 +86,7 @@ sub DESTROY { return if defined $self->{history_length} && $self->{history_length} == 0; # XXX support more later - return unless $self->{term}->ReadLine eq ('Term::ReadLine::Gnu' or 'Term::ReadLine::Perl5'); + return unless ($self->{term}->ReadLine eq 'Term::ReadLine::Gnu') || ($self->{term}->ReadLine eq 'Term::ReadLine::Perl5'); $self->{term}->WriteHistory($self->{history_file}) or warn "Couldn't write history to $self->{history_file}"; -- cgit v1.2.3