From bfc9b2f89c4cd8962a74ab750c870a90da961805 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 16 May 2014 18:34:14 +0000 Subject: NOPERLDOC envvar override to avoid pod2usage() invoking perldoc (thread at http://tug.org/pipermail/tex-live/2014-May/035206.html) git-svn-id: svn://tug.org/texlive/trunk@34059 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/scripts') diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index a20fc17e71f..dc9afba79e8 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -286,11 +286,12 @@ sub main { } if ($opts{"help"} || $opts{"h"}) { - # perldoc does ASCII emphasis on the output, so it's nice to use it. - # But not all Unix platforms have it, and on Windows our Config.pm - # can apparently interfere, so always skip it there. + # perldoc does ASCII emphasis on the output, and runs it through + # $PAGER, so people want it. But not all Unix platforms have it, + # and on Windows our Config.pm can apparently interfere, so always + # skip it there. Or if users have NOPERLDOC set in the environment. my @noperldoc = (); - if (win32()) { + if (win32() || $ENV{"NOPERLDOC"}) { @noperldoc = ("-noperldoc", "1"); } else { if (!TeXLive::TLUtils::which("perldoc")) { @@ -309,9 +310,10 @@ sub main { } } } - # in some cases LESSPIPE of less breaks control characters - # and the output of pod2usage is broken. - # We add/set LESS=-R in the environment and unset LESSPIPE to be sure + # less can break control characters and thus the output of pod2usage + # is broken. We add/set LESS=-R in the environment and unset + # LESSPIPE and LESSOPEN to try to help. + # if (defined($ENV{'LESS'})) { $ENV{'LESS'} .= " -R"; } else { @@ -6242,7 +6244,12 @@ revision number for the loaded TeX Live Perl modules are shown, too. =head2 help -Gives this help information (same as C<--help>). +Display this help information and exit (same as C<--help>, and on the +web at L). Sometimes the +C and/or C programs on the system have problems, +resulting in control characters being literally output. This can't +always be detected, but you can set the C environment +variable and C will not be used. =head2 version -- cgit v1.2.3