From: Norton T. Allen Date: Wed, 2 Jan 2002 14:22:09 +0000 (-0500) Subject: PATCH: lib/Term/Cap.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=96af66be42b7864817b8cbb1e321096e1a058501;p=p5sagit%2Fp5-mst-13.2.git PATCH: lib/Term/Cap.pm Message-Id: <200201021922.OAA18505@bottesini.harvard.edu> p4raw-id: //depot/perl@14024 --- diff --git a/lib/Term/Cap.pm b/lib/Term/Cap.pm index 0e34d7a..8cf14c9 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; + } } + } } }