Change 17816 by [EMAIL PROTECTED] on 2002/08/30 13:10:45
Subject: [PATCH 5.8.0] Term::Cap allow # comments in infcocmp output
From: "Brendan O'Dea" <[EMAIL PROTECTED]>
Date: Thu, 29 Aug 2002 22:46:47 +1000
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/lib/Term/Cap.pm#23 edit
Differences ...
==== //depot/perl/lib/Term/Cap.pm#23 (text) ====
Index: perl/lib/Term/Cap.pm
--- perl/lib/Term/Cap.pm#22~14026~ Wed Jan 2 13:38:34 2002
+++ perl/lib/Term/Cap.pm Fri Aug 30 06:10:45 2002
@@ -6,7 +6,7 @@
use vars qw($VERSION $VMS_TERMCAP);
use vars qw($termpat $state $first $entry);
-$VERSION = '1.07';
+$VERSION = '1.08';
# Version undef: Thu Dec 14 20:02:42 CST 1995 by [EMAIL PROTECTED]
# Version 1.00: Thu Nov 30 23:34:29 EST 2000 by [EMAIL PROTECTED]
@@ -29,6 +29,8 @@
# Version 1.07: Wed Jan 2 21:35:09 GMT 2002
# Sanity check on infocmp output from Norton Allen
# Repaired INSTALLDIRS thanks to Michael Schwern
+# Version 1.08: Fri Aug 30 14:15:55 CEST 2002
+# Cope with comments lines from 'infocmp' from Brendan O'Dea
# TODO:
# support Berkeley DB termcaps
@@ -217,9 +219,9 @@
}
else {
if ( grep { -x "$_/infocmp" } split /:/, $ENV{PATH} ) {
- eval
- {
+ eval {
my $tmp = `infocmp -C 2>/dev/null`;
+ $tmp =~ s/^#.*\n//gm; # remove comments
if (( $tmp !~ m%^/%s ) && ( $tmp =~ /(^|\|)${termpat}[:|]/s)) {
$entry = $tmp;
End of Patch.