summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Pod/Text/Termcap.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Pod/Text/Termcap.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/Pod/Text/Termcap.pm39
1 files changed, 27 insertions, 12 deletions
diff --git a/Master/tlpkg/tlperl/lib/Pod/Text/Termcap.pm b/Master/tlpkg/tlperl/lib/Pod/Text/Termcap.pm
index 18ba7b20ff5..d533e76ddde 100644
--- a/Master/tlpkg/tlperl/lib/Pod/Text/Termcap.pm
+++ b/Master/tlpkg/tlperl/lib/Pod/Text/Termcap.pm
@@ -4,8 +4,8 @@
# output the right termcap escape sequences for formatted text on the current
# terminal type.
#
-# Copyright 1999, 2001, 2002, 2004, 2006, 2008, 2009
-# Russ Allbery <rra@stanford.edu>
+# Copyright 1999, 2001, 2002, 2004, 2006, 2008, 2009, 2014, 2015
+# Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -16,18 +16,19 @@
package Pod::Text::Termcap;
-require 5.004;
+use 5.006;
+use strict;
+use warnings;
use Pod::Text ();
use POSIX ();
use Term::Cap;
-use strict;
use vars qw(@ISA $VERSION);
@ISA = qw(Pod::Text);
-$VERSION = '2.08';
+$VERSION = '4.07';
##############################################################################
# Overrides
@@ -42,9 +43,11 @@ sub new {
# $ENV{HOME} is usually not set on Windows. The default Term::Cap path
# may not work on Solaris.
- my $home = exists $ENV{HOME} ? "$ENV{HOME}/.termcap:" : '';
- $ENV{TERMPATH} = $home . '/etc/termcap:/usr/share/misc/termcap'
- . ':/usr/share/lib/termcap';
+ unless (exists $ENV{TERMPATH}) {
+ my $home = exists $ENV{HOME} ? "$ENV{HOME}/.termcap:" : '';
+ $ENV{TERMPATH} =
+ "${home}/etc/termcap:/usr/share/misc/termcap:/usr/share/lib/termcap";
+ }
# Fall back on a hard-coded terminal speed if POSIX::Termios isn't
# available (such as on VMS).
@@ -144,7 +147,7 @@ __END__
Pod::Text::Termcap - Convert POD data to ASCII text with format escapes
=for stopwords
-ECMA-48 VT100 Allbery
+ECMA-48 VT100 Allbery Solaris TERMPATH
=head1 SYNOPSIS
@@ -164,6 +167,18 @@ text using the correct termcap escape sequences for the current terminal.
Apart from the format codes, it in all ways functions like Pod::Text. See
L<Pod::Text> for details and available options.
+=head1 ENVIRONMENT
+
+This module sets the TERMPATH environment variable globally to:
+
+ $HOME/.termcap:/etc/termcap:/usr/share/misc/termcap:/usr/share/lib/termcap
+
+if it isn't already set. (The first entry is omitted if the HOME
+environment variable isn't set.) This is a (very old) workaround for
+problems finding termcap information on older versions of Solaris, and is
+not good module behavior. Please do not rely on this behavior; it may be
+dropped in a future release.
+
=head1 NOTES
This module uses Term::Cap to retrieve the formatting escape sequences for
@@ -182,12 +197,12 @@ Perl core distribution as of 5.6.0.
=head1 AUTHOR
-Russ Allbery <rra@stanford.edu>.
+Russ Allbery <rra@cpan.org>.
=head1 COPYRIGHT AND LICENSE
-Copyright 1999, 2001, 2002, 2004, 2006, 2008, 2009 Russ Allbery
-<rra@stanford.edu>.
+Copyright 1999, 2001, 2002, 2004, 2006, 2008, 2009, 2014, 2015 Russ Allbery
+<rra@cpan.org>
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.