diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-08 00:16:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-08 00:16:42 +0000 |
commit | 34a8597760ab5740abd49b6d8be10e1876f5ce98 (patch) | |
tree | 099a794912a28b3ebbc857961643ba29b28e674a /Master/tlpkg/tlperl/lib/Pod/Perldoc | |
parent | 2ca3610031316a7312d046d3ae4c783452831216 (diff) |
(tl)perl 5.26.1 from siep
git-svn-id: svn://tug.org/texlive/trunk@46882 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Pod/Perldoc')
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/BaseTo.pm | 3 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/GetOptsOO.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToANSI.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToChecker.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToMan.pm | 4 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToNroff.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToPod.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToRtf.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTerm.pm | 42 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToText.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTk.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc/ToXml.pm | 2 |
12 files changed, 52 insertions, 15 deletions
diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/BaseTo.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/BaseTo.pm index 304da44ede2..37f651047d6 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/BaseTo.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/BaseTo.pm @@ -3,7 +3,7 @@ use strict; use warnings; use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; use Carp qw(croak carp); use Config qw(%Config); @@ -33,6 +33,7 @@ BEGIN { *is_linux = $^O eq 'linux' ? \&TRUE : \&FALSE unless defined &is_linux; *is_hpux = $^O =~ m/hpux/ ? \&TRUE : \&FALSE unless defined &is_hpux; *is_openbsd = $^O =~ m/openbsd/ ? \&TRUE : \&FALSE unless defined &is_openbsd; + *is_freebsd = $^O =~ m/freebsd/ ? \&TRUE : \&FALSE unless defined &is_freebsd; *is_bitrig = $^O =~ m/bitrig/ ? \&TRUE : \&FALSE unless defined &is_bitrig; } diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/GetOptsOO.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/GetOptsOO.pm index 71fcc7bc9a2..afa2574ec7e 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/GetOptsOO.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/GetOptsOO.pm @@ -2,7 +2,7 @@ package Pod::Perldoc::GetOptsOO; use strict; use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; BEGIN { # Make a DEBUG constant ASAP *DEBUG = defined( &Pod::Perldoc::DEBUG ) diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToANSI.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToANSI.pm index 26a11d3c809..8217c7b1bc4 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToANSI.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToANSI.pm @@ -4,7 +4,7 @@ use warnings; use parent qw(Pod::Perldoc::BaseTo); use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; sub is_pageable { 1 } sub write_with_binmode { 0 } diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToChecker.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToChecker.pm index 3d161acf51c..a6dbbe3f033 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToChecker.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToChecker.pm @@ -4,7 +4,7 @@ use warnings; use vars qw(@ISA); use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; # Pick our superclass... # diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToMan.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToMan.pm index e22e05044d1..bfcb5c40ee6 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToMan.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToMan.pm @@ -5,7 +5,7 @@ use warnings; use parent qw(Pod::Perldoc::BaseTo); use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; use File::Spec::Functions qw(catfile); use Pod::Man 2.18; @@ -63,7 +63,7 @@ sub init { sub _roffer_candidates { my( $self ) = @_; - if( $self->is_openbsd || $self->is_bitrig ) { qw( mandoc groff nroff ) } + if( $self->is_openbsd || $self->is_freebsd || $self->is_bitrig ) { qw( mandoc groff nroff ) } else { qw( groff nroff mandoc ) } } diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToNroff.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToNroff.pm index ac4a8aa17d4..a52f6160192 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToNroff.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToNroff.pm @@ -4,7 +4,7 @@ use warnings; use parent qw(Pod::Perldoc::BaseTo); use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; # This is unlike ToMan.pm in that it emits the raw nroff source! diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToPod.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToPod.pm index 8433e8ca409..825a1caaf5b 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToPod.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToPod.pm @@ -4,7 +4,7 @@ use warnings; use parent qw(Pod::Perldoc::BaseTo); use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; sub is_pageable { 1 } sub write_with_binmode { 0 } diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToRtf.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToRtf.pm index 81f019f8a20..d084816cab2 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToRtf.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToRtf.pm @@ -4,7 +4,7 @@ use warnings; use parent qw( Pod::Simple::RTF ); use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; sub is_pageable { 0 } sub write_with_binmode { 0 } diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTerm.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTerm.pm index e97a775e10e..9501d6310e7 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTerm.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTerm.pm @@ -3,7 +3,7 @@ use strict; use warnings; use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; use parent qw(Pod::Perldoc::BaseTo); @@ -26,6 +26,34 @@ sub width { $self->_get_default_width; } +sub pager_configuration { + my($self, $pager, $perldoc) = @_; + + # do not modify anything on Windows or DOS + return if ( $perldoc->is_mswin32 || $perldoc->is_dos ); + + if ( $pager =~ /less/ ) { + $self->_maybe_modify_environment('LESS'); + } + elsif ( $pager =~ /more/ ) { + $self->_maybe_modify_environment('MORE'); + } + + return; +} + +sub _maybe_modify_environment { + my($self, $name) = @_; + + if ( ! defined $ENV{$name} ) { + $ENV{$name} = "-R"; + } + + # if the environment is set, don't modify + # anything + +} + sub _get_stty { `stty -a` } sub _get_columns_from_stty { @@ -89,7 +117,7 @@ sub parse_from_file { =head1 NAME -Pod::Perldoc::ToTerm - render Pod with terminal escapes +Pod::Perldoc::ToTerm - render Pod with terminal escapes =head1 SYNOPSIS @@ -107,6 +135,14 @@ For example: perldoc -o term -w indent:5 Some::Modulename +=head1 PAGER FORMATTING + +Depending on the platform, and because this class emits terminal escapes it +will attempt to set the C<-R> flag on your pager by injecting the flag into +your environment variable for C<less> or C<more>. + +On Windows and DOS, this class will not modify any environment variables. + =head1 CAVEAT This module may change to use a different text formatter class in the @@ -118,7 +154,7 @@ L<Pod::Text>, L<Pod::Text::Termcap>, L<Pod::Perldoc> =head1 COPYRIGHT AND DISCLAIMERS -Copyright (c) 2011 Mark Allen. +Copyright (c) 2017 Mark Allen. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToText.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToText.pm index dbd47438d3a..99ab66c3048 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToText.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToText.pm @@ -3,7 +3,7 @@ use strict; use warnings; use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; use parent qw(Pod::Perldoc::BaseTo); diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTk.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTk.pm index 40b51c5b438..6ca7542c7af 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTk.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToTk.pm @@ -3,7 +3,7 @@ use strict; use warnings; use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; use parent qw(Pod::Perldoc::BaseTo); diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToXml.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToXml.pm index 9da514f7f61..0161c048a9c 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToXml.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc/ToXml.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use parent qw( Pod::Simple::XMLOutStream ); use vars qw($VERSION); -$VERSION = '3.25'; +$VERSION = '3.28'; sub is_pageable { 0 } sub write_with_binmode { 0 } |