summaryrefslogtreecommitdiff
path: root/lib/Term
diff options
context:
space:
mode:
authorJonathan Stowe <gellyfish@gellyfish.com>2002-01-02 21:50:36 +0000
committerAbhijit Menon-Sen <ams@wiw.org>2002-01-02 21:38:34 +0000
commit8bb1827720a1484fd1840d09c6b4e71fd5726b43 (patch)
treecf6efc4408c2f561572741ef2b7ae0086ea51776 /lib/Term
parentd37a953848a8a5e776efddc4a0591621effaf5f1 (diff)
downloadperl-8bb1827720a1484fd1840d09c6b4e71fd5726b43.tar.gz
Re: PATCH: lib/Term/Cap.pm
Message-Id: <Pine.LNX.4.33.0201022144370.6042-100000@orpheus.gellyfish.com> p4raw-id: //depot/perl@14026
Diffstat (limited to 'lib/Term')
-rw-r--r--lib/Term/Cap.pm22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/Term/Cap.pm b/lib/Term/Cap.pm
index 8cf14c97c1..03d2573d85 100644
--- a/lib/Term/Cap.pm
+++ b/lib/Term/Cap.pm
@@ -6,7 +6,7 @@ use strict;
use vars qw($VERSION $VMS_TERMCAP);
use vars qw($termpat $state $first $entry);
-$VERSION = '1.06';
+$VERSION = '1.07';
# Version undef: Thu Dec 14 20:02:42 CST 1995 by sanders@bsdi.com
# Version 1.00: Thu Nov 30 23:34:29 EST 2000 by schwern@pobox.com
@@ -26,6 +26,9 @@ $VERSION = '1.06';
# Version 1.06: Thu Dec 6 18:43:22 GMT 2001
# Preload the default VMS termcap from Charles Lane
# Don't carp at setting OSPEED unless warnings are on.
+# 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
# TODO:
# support Berkeley DB termcaps
@@ -213,15 +216,16 @@ sub Tgetent { ## public -- static method
$entry = $VMS_TERMCAP;
}
else {
- if ( grep { -x "$_/infocmp" } split /:/, $ENV{PATH} ) {
- eval
- {
- $foo = `infocmp -C 2>/dev/null`;
- if (($foo !~ m:^/:s) && ($foo =~ m/(^|\|)${termpat}[:|]/s)) {
- $entry = $foo;
- }
+ if ( grep { -x "$_/infocmp" } split /:/, $ENV{PATH} ) {
+ eval
+ {
+ my $tmp = `infocmp -C 2>/dev/null`;
+
+ if (( $tmp !~ m%^/%s ) && ( $tmp =~ /(^|\|)${termpat}[:|]/s)) {
+ $entry = $tmp;
+ }
+ };
}
- }
}
}