Subject: | please review/incorporate patches from the Debian package |
Hi,
while preparing an upload of the Debian package to fix RT#123398, I noticed three patches to Term-ReadLine-Gnu that we have in Debian but don't seem to ever have been forwarded to you. I'm attaching these patches in the hope that you find them useful for inclusion in the next release (or whenever convenient):
1) 10term.patch fixes a warning when $ENV{TERM} is uninitialized, as observed in https://bugs.debian.org/99843
2) 20new.patch checks for the amount of arguments given to new(), in response to https://bugs.debian.org/204362
3) 40terminfo.patch checks and uses the tinfo library in Makefile.PL, in response to https://bugs.debian.org/644423
Thank you.
Subject: | 10term.patch |
# 10term.patch by Niko Tyni <ntyni@iki.fi>
# DP: Fix uninitialized value message
# DP: (#99843, patch by Nicolas Bertolissio)
--- a/Gnu/XS.pm
+++ b/Gnu/XS.pm
@@ -363,11 +363,12 @@ sub get_history_event ( $$;$ ) {
# Some terminals do not support 'ue' (underline end).
our %term_no_ue = ( kterm => 1 );
+
sub ornaments {
return $rl_term_set unless @_;
$rl_term_set = shift;
$rl_term_set ||= ',,,';
- $rl_term_set = $term_no_ue{$ENV{TERM}} ? 'us,me,,' : 'us,ue,,'
+ $rl_term_set = $term_no_ue{defined($ENV{TERM}) ? $ENV{TERM} : ''} ? 'us,me,,' : 'us,ue,,'
if $rl_term_set eq '1';
my @ts = split /,/, $rl_term_set, 4;
my @rl_term_set
Subject: | 20new.patch |
# 20new.patch by Niko Tyni <ntyni@iki.fi>
# DP: Fix new() argument checking and documentation.
# DP: (#204362, patch by Nicolas Bertolissio)
--- a/Gnu.pm
+++ b/Gnu.pm
@@ -245,6 +245,7 @@ sub new {
my $this = shift; # Package
my $class = ref($this) || $this;
+ croak "Wrong number of arguments" unless @_==1 or @_==3;
my $name = shift;
my $self = \%Attribs;
Subject: | 40terminfo.patch |
Description: check for -ltinfo
Origin: vendor
Bug_debian: https://bugs.debian.org/644423
Forwarded: no
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2011-10-07
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -82,11 +82,12 @@
my $PREFER_CURSES = $Config{osname} eq 'aix' || $Config{osname} eq 'hpux'
|| $Config{osname} eq 'cygwin';
my $TERMCAP_LIB = (! $PREFER_CURSES && &search_lib('-ltermcap'))
- || &search_lib('-lncurses')
+ || &search_lib('-ltinfo')
+ || &search_lib('-lncurses')
|| &search_lib('-lcurses');
unless ($TERMCAP_LIB) {
- warn "Could not find neither libtermcap.a, libncurses.a, or libcurses.\n";
+ warn "Could not find neither libtinfo, libtermcap.a, libncurses.a, or libcurses.\n";
exit $err;
}