This queue is for tickets about the TermReadKey CPAN distribution.

Report information
The Basics
Id:
35669
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
dmn [...] debian.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
  • 2.21
  • 2.30
Fixed in:
(no value)

Attachments


Subject: [patch] Term::Readkey, GetTerminalSize dies on failure
Hi, Attached is a patch used in the Debian package of Term::ReadKey that brings the code in accordance to the documentation. the documentation of the GetTerminalSize function reads: Returns either an empty array if this operation is unsupported, or a four element array containing[...] The code, however simply dies, instead of returning an empty array. For reference, the Debian bug report is at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=300711 Thanks in advance, dam
Subject: GetTermSize-as-documented-300711.patch
# Modify the GetTerminalSize function to match its documented behaviour --- libterm-readkey-perl-2.30.orig/ReadKey.pm +++ libterm-readkey-perl-2.30/ReadKey.pm @@ -357,10 +357,11 @@ push( @fail, "resize program" ); } - if ( @results < 4 ) + if ( @results != 4 ) { - die "Unable to get Terminal Size." + warn "Unable to get Terminal Size." . join( "", map( " The $_ didn't work.", @fail ) ); + return undef; } @results;
On Tue May 06 16:10:42 2008, dam@modsoftsys.com wrote:
Show quoted text
> Hi, > > Attached is a patch used in the Debian package of Term::ReadKey that > brings the code in accordance to the documentation. > > the documentation of the GetTerminalSize function reads: > > Returns either an empty array if this operation is unsupported, or a > four element array containing[...] > > The code, however simply dies, instead of returning an empty array. > > > For reference, the Debian bug report is at > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=300711 > > > Thanks in advance, > dam
Thanks belatedly applied as https://github.com/jonathanstowe/TermReadKey/commit/b3fe535a55f367c4746a68618c6c85f3ed3a9f66


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.