diff options
author | Jonathan Stowe <gellyfish@gellyfish.com> | 2004-04-20 13:37:28 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-04-20 12:27:18 +0000 |
commit | 0ca33fed0ac502beb86fe06f05e7aeff66a75665 (patch) | |
tree | 6154b5c390db1d58e99e3cb6536bf7dbb497c782 /lib/Term | |
parent | 181bc48df1acbf1e213b165d7e27c61b63e2b13e (diff) | |
download | perl-0ca33fed0ac502beb86fe06f05e7aeff66a75665.tar.gz |
Sync Term::Cap with CPAN version
Message-Id: <1082461047.2736.96.camel@localhost>
p4raw-id: //depot/perl@22717
Diffstat (limited to 'lib/Term')
-rw-r--r-- | lib/Term/Cap.pm | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/lib/Term/Cap.pm b/lib/Term/Cap.pm index 1deadc5504..b71c51ceba 100644 --- a/lib/Term/Cap.pm +++ b/lib/Term/Cap.pm @@ -1,12 +1,23 @@ package Term::Cap; -use Carp; +# Since the debugger uses Term::ReadLine which uses Term::Cap, we want +# to load as few modules as possible. This includes Carp.pm. +sub carp { + require Carp; + goto &Carp::carp; +} + +sub croak { + require Carp; + goto &Carp::croak; +} + use strict; use vars qw($VERSION $VMS_TERMCAP); use vars qw($termpat $state $first $entry); -$VERSION = '1.08'; +$VERSION = '1.09'; # 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 @@ -29,8 +40,13 @@ $VERSION = '1.08'; # 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 +# Version 1.08: Sat Sep 28 11:33:15 BST 2002 +# Late loading of 'Carp' as per Michael Schwern +# Version 1.09: Tue Apr 20 12:06:51 BST 2004 +# Merged in changes from and to Core +# Core (Fri Aug 30 14:15:55 CEST 2002): +# Cope with comments lines from 'infocmp' from Brendan O'Dea +# Allow for EBCDIC in Tgoto magic test. # TODO: # support Berkeley DB termcaps @@ -219,10 +235,10 @@ sub Tgetent { ## public -- static method } else { if ( grep { -x "$_/infocmp" } split /:/, $ENV{PATH} ) { - eval { + eval + { my $tmp = `infocmp -C 2>/dev/null`; - $tmp =~ s/^#.*\n//gm; # remove comments - + $tmp =~ s/^#.*\n//gm; # remove comments if (( $tmp !~ m%^/%s ) && ( $tmp =~ /(^|\|)${termpat}[:|]/s)) { $entry = $tmp; } |