Fix typo in ReadLineHistory plugin
Chris Marshall [Wed, 12 May 2010 22:36:43 +0000 (18:36 -0400)]
ReadLineHistory needs more work for full support of
Term::ReadLine::Perl since it does not have methods
for ReadHistory and WriteHistory.

lib/Devel/REPL/Plugin/ReadLineHistory.pm

index 711aa3d..61ad9c0 100644 (file)
@@ -20,10 +20,10 @@ my $hist_len=$ENV{PERLREPL_HISTLEN} || 100;
 around 'run' => sub {
   my $orig=shift;
   my ($self, @args)=@_;
-  if ($self->term->Attribs->{ReadLine} eq 'Term::ReadLine::Gnu') {
+  if ($self->term->ReadLine eq 'Term::ReadLine::Gnu') {
      $self->term->stifle_history($hist_len);
   }
-  if ($self->term->Attribs->{ReadLine} eq 'Term::ReadLine::Perl') {
+  if ($self->term->ReadLine eq 'Term::ReadLine::Perl') {
      $self->term->Attribs->{MaxHistorySize} = $hist_len;
   }
   -f($hist_file) && $self->term->ReadHistory($hist_file);