summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKosuke Asami <tfortress58@gmail.com>2013-07-18 17:11:20 +0900
committerKosuke Asami <tfortress58@gmail.com>2013-07-18 17:11:20 +0900
commit6029c1b8994b3f4757f6450cc69bbe2454c2d8be (patch)
tree0dd60ac30a1a5d396baa712f8437ac50efb9f5ae
parentc64879747f508ccd054e36c161635c1506d107cf (diff)
downloadreply-6029c1b8994b3f4757f6450cc69bbe2454c2d8be.tar.gz
reply-6029c1b8994b3f4757f6450cc69bbe2454c2d8be.zip
readline: fix a bug that can't handle correct ReadLine class
simple mistake ... sorry
-rw-r--r--lib/Reply/Plugin/ReadLine.pm4
1 files 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}";