Skip Menu |

This queue is for tickets about the Term-ReadLine-Perl CPAN distribution.

Report information
The Basics
Id: 46210
Status: open
Priority: 0/
Queue: Term-ReadLine-Perl

People
Owner: Nobody in particular
Requestors: 4ux6as402 [...] sneakemail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.0302
Fixed in: (no value)



Subject: CTRL-R gives warnings when next keys are pressed.
Run the tiny example from perldoc Term::Readline but run it with perl's -w option. Then, when you hit CTRL-R (for F_ReverseSearchHistory), then you'll get these warnings for every pressed key after CTRL-R (C-r in emacs terminology): Use of uninitialized value within @readline::KeyMap in string eq at (eval 8) line 21. Use of uninitialized value within @readline::KeyMap in string eq at (eval 8) line 21. This is fixed with the attached patch.
Subject: ctrl-r-warning.patch
--- orig.readline.pm 2009-05-19 12:57:15.000000000 +0200 +++ readline.pm 2009-05-19 12:56:40.000000000 +0200 @@ -2904,7 +2904,7 @@ &redisplay( '('.($reverse?'reverse-':'') ."i-search) `$searchstr': "); $c = &getc_with_pending; - if ($KeyMap[ord($c)] eq 'F_ReverseSearchHistory') { + if ($KeyMap[ord($c)] && $KeyMap[ord($c)] eq 'F_ReverseSearchHistory') { if ($reverse && $I != -1) { if ($tmp = &search($I-1,$searchstr), $tmp >= 0) { $I = $tmp; @@ -2913,7 +2913,7 @@ } } $reverse = 1; - } elsif ($KeyMap[ord($c)] eq 'F_ForwardSearchHistory') { + } elsif ($KeyMap[ord($c)] && $KeyMap[ord($c)] eq 'F_ForwardSearchHistory') { if (!$reverse && $I != -1) { if ($tmp = &search($I+1,$searchstr), $tmp >= 0) { $I = $tmp;
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #46210] CTRL-R gives warnings when next keys are pressed.
Date: Thu, 21 May 2009 01:34:17 -0700
To: Peter Valdemar M?rch via RT <bug-Term-ReadLine-Perl [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Tue, May 19, 2009 at 07:05:53AM -0400, Peter Valdemar M?rch via RT wrote: Show quoted text
> Run the tiny example from perldoc Term::Readline but run it with perl's > -w option. Then, when you hit CTRL-R (for F_ReverseSearchHistory), then > you'll get these warnings for every pressed key after CTRL-R (C-r in > emacs terminology): > > Use of uninitialized value within @readline::KeyMap in string eq at > (eval 8) line 21. > Use of uninitialized value within @readline::KeyMap in string eq at > (eval 8) line 21. > > This is fixed with the attached patch.
Did not try this, but I trust you. >>TODO... Thanks, Ilya
From: peter [...] morch.com
On Tue May 19 07:05:51 2009, peter@morch.com wrote: Show quoted text
> Run the tiny example from perldoc Term::Readline but run it with perl's > -w option. Then, when you hit CTRL-R (for F_ReverseSearchHistory), then > you'll get these warnings for every pressed key after CTRL-R (C-r in > emacs terminology): > > Use of uninitialized value within @readline::KeyMap in string eq at > (eval 8) line 21. > Use of uninitialized value within @readline::KeyMap in string eq at > (eval 8) line 21. > > This is fixed with the attached patch.
Also, this also only appears as a problem if Term::ReadLine::Perl. If I install Term::ReadLine::Gnu it gets used instead and the problem disappears.