diff options
author | Jonathan Stowe <gellyfish@gellyfish.com> | 2001-12-03 15:48:38 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-03 17:15:52 +0000 |
commit | 7cae2445f8ea3c3758a465c9737cde17e55be1a6 (patch) | |
tree | eccb07e9a052ba7f1d9bcbd358c74752dadd1959 | |
parent | 647dadd14bee3a9032c04c4e0f811f10e02816fd (diff) | |
download | perl-7cae2445f8ea3c3758a465c9737cde17e55be1a6.tar.gz |
was Re: [PATCH] Shared hash keys
Message-ID: <Pine.LNX.4.33.0112031543290.386-100000@orpheus.gellyfish.com>
p4raw-id: //depot/perl@13441
-rw-r--r-- | lib/Term/Cap.pm | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/lib/Term/Cap.pm b/lib/Term/Cap.pm index 69a2f5e2e1..a44601afe7 100644 --- a/lib/Term/Cap.pm +++ b/lib/Term/Cap.pm @@ -1,10 +1,12 @@ package Term::Cap; use Carp; +use strict; use vars qw($VERSION); +use vars qw($termpat $state $first $entry); -$VERSION = '1.03'; +$VERSION = '1.05'; # 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 @@ -19,6 +21,9 @@ $VERSION = '1.03'; # VMS Support from Charles Lane <lane@DUPHY4.Physics.Drexel.Edu> # Version 1.04: Thu Nov 29 16:22:03 GMT 2001 # Fixed warnings in test +# Version 1.05: Mon Dec 3 15:33:49 GMT 2001 +# Don't try to fall back on infocmp if it's not there. From chromatic. +# # TODO: # support Berkeley DB termcaps @@ -189,17 +194,17 @@ sub Tgetent { ## public -- static method # last resort--fake up a termcap from terminfo local $ENV{TERM} = $term; - if ( $^O eq 'VMS' ) { - chomp(my @entry = <DATA>); - $entry = join '', @entry; - } - else { - eval - { - $entry = `infocmp -C 2>/dev/null`; - } - } - + if ( $^O eq 'VMS' ) { + chomp(my @entry = <DATA>); + $entry = join '', @entry; + } + else { + eval + { + $entry = `infocmp -C 2>/dev/null` + if grep { -x "$_/infocmp" } split /:/, $ENV{PATH}; + } + } } croak "Can't find a valid termcap file" unless @termcap_path || $entry; |