From 96af66be42b7864817b8cbb1e321096e1a058501 Mon Sep 17 00:00:00 2001 From: "Norton T. Allen" Date: Wed, 2 Jan 2002 09:22:09 -0500 Subject: PATCH: lib/Term/Cap.pm Message-Id: <200201021922.OAA18505@bottesini.harvard.edu> p4raw-id: //depot/perl@14024 --- lib/Term/Cap.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/Term') diff --git a/lib/Term/Cap.pm b/lib/Term/Cap.pm index 0e34d7a3da..8cf14c97c1 100644 --- a/lib/Term/Cap.pm +++ b/lib/Term/Cap.pm @@ -213,11 +213,15 @@ sub Tgetent { ## public -- static method $entry = $VMS_TERMCAP; } else { + if ( grep { -x "$_/infocmp" } split /:/, $ENV{PATH} ) { eval { - $entry = `infocmp -C 2>/dev/null` - if grep { -x "$_/infocmp" } split /:/, $ENV{PATH}; + $foo = `infocmp -C 2>/dev/null`; + if (($foo !~ m:^/:s) && ($foo =~ m/(^|\|)${termpat}[:|]/s)) { + $entry = $foo; + } } + } } } -- cgit v1.2.1