From 7548e4d37c2aaefd32fe0a9bcd83f8e71326dde1 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 4 Apr 2022 03:14:42 +0000 Subject: CTAN sync 202204040314 --- .../texlive/tlnet/tlpkg/tlperl/lib/Pod/Checker.pm | 128 ++++++++++++++++++++- systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Html.pm | 31 ++++- .../texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple.pm | 4 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/BlackBox.pm | 10 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/Checker.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/Debug.pm | 2 +- .../tlpkg/tlperl/lib/Pod/Simple/DumpAsText.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsXML.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/HTML.pm | 10 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/HTMLBatch.pm | 13 ++- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/JustPod.pm | 4 + .../tlpkg/tlperl/lib/Pod/Simple/LinkSection.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/Methody.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/Progress.pm | 2 +- .../tlpkg/tlperl/lib/Pod/Simple/PullParser.pm | 2 +- .../tlperl/lib/Pod/Simple/PullParserEndToken.pm | 2 +- .../tlperl/lib/Pod/Simple/PullParserStartToken.pm | 2 +- .../tlperl/lib/Pod/Simple/PullParserTextToken.pm | 2 +- .../tlpkg/tlperl/lib/Pod/Simple/PullParserToken.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/RTF.pm | 4 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/Search.pm | 2 +- .../tlpkg/tlperl/lib/Pod/Simple/SimpleTree.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/Text.pm | 2 +- .../tlpkg/tlperl/lib/Pod/Simple/TextContent.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/TiedOutFH.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/Transcode.pm | 2 +- .../tlpkg/tlperl/lib/Pod/Simple/TranscodeDumb.pm | 2 +- .../tlpkg/tlperl/lib/Pod/Simple/TranscodeSmart.pm | 2 +- .../tlnet/tlpkg/tlperl/lib/Pod/Simple/XHTML.pm | 6 +- .../tlpkg/tlperl/lib/Pod/Simple/XMLOutStream.pm | 2 +- .../texlive/tlnet/tlpkg/tlperl/lib/Pod/Usage.pm | 124 +++++++++++++------- 31 files changed, 282 insertions(+), 94 deletions(-) (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/Pod') diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Checker.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Checker.pm index 0d18aaedb1..bee20d0bfa 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Checker.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Checker.pm @@ -10,7 +10,7 @@ package Pod::Checker; use strict; use warnings; -our $VERSION = '1.73'; ## Current version of this package +our $VERSION = '1.74'; ## Current version of this package =head1 NAME @@ -197,10 +197,6 @@ The I found cannot be interpreted as a character entity. There needs to be content inside E, L, and X formatting codes. -=item * A non-empty ZEE - -The CE> sequence is supposed to be empty. - =item * Spurious text after =pod / =cut The commands C<=pod> and C<=cut> do not take any arguments. @@ -299,6 +295,12 @@ description of what the thing is good for. For example if there is a C<=head2> in the POD file prior to a C<=head1>. +=item * A non-empty ZEE + +The CE> sequence is supposed to be empty. Caveat: this issue is +detected in L and will be flagged as an I by any client +code; any contents of C...E> will be disregarded, anyway. + =back =head2 Hyperlinks @@ -361,11 +363,122 @@ B (the script). This allows users of B to control completely the output behavior. Users of B (the script) get the well-known behavior. -v1.45 inherits from Pod::Simple as opposed to all previous versions +v1.45 inherits from L as opposed to all previous versions inheriting from Pod::Parser. Do B use Pod::Simple's interface when using Pod::Checker unless it is documented somewhere on this page. I repeat, DO B USE POD::SIMPLE'S INTERFACE. +The following list documents the overrides to Pod::Simple, primarily to +make L happy: + +=over 4 + +=item end_B + +=item end_C + +=item end_Document + +=item end_F + +=item end_I + +=item end_L + +=item end_Para + +=item end_S + +=item end_X + +=item end_fcode + +=item end_for + +=item end_head + +=item end_head1 + +=item end_head2 + +=item end_head3 + +=item end_head4 + +=item end_item + +=item end_item_bullet + +=item end_item_number + +=item end_item_text + +=item handle_pod_and_cut + +=item handle_text + +=item handle_whiteline + +=item hyperlink + +=item scream + +=item start_B + +=item start_C + +=item start_Data + +=item start_F + +=item start_I + +=item start_L + +=item start_Para + +=item start_S + +=item start_Verbatim + +=item start_X + +=item start_fcode + +=item start_for + +=item start_head + +=item start_head1 + +=item start_head2 + +=item start_head3 + +=item start_head4 + +=item start_item_bullet + +=item start_item_number + +=item start_item_text + +=item start_over + +=item start_over_block + +=item start_over_bullet + +=item start_over_empty + +=item start_over_number + +=item start_over_text + +=item whine + +=back + =cut ############################################################################# @@ -663,6 +776,9 @@ sub whine { $complaint =~ /^You have '=item .+?' instead of the expected '=item .+?'$/; } + # rt.cpan.org #98326 - errors about Z<> ("non-empty") + $severity = 'WARNING' if $complaint =~ /\bZ\<\>/; + $self->poderror({ -line => $line, -severity => $severity, -msg => $complaint }); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Html.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Html.pm index 71555e723c..ba0ab0b39a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Html.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Html.pm @@ -2,7 +2,7 @@ package Pod::Html; use strict; require Exporter; -our $VERSION = 1.25; +our $VERSION = 1.27; our @ISA = qw(Exporter); our @EXPORT = qw(pod2html htmlify); our @EXPORT_OK = qw(anchorify relativize_url); @@ -16,6 +16,7 @@ use File::Spec::Unix; use Getopt::Long; use Pod::Simple::Search; use Pod::Simple::SimpleTree (); +use Text::Tabs; use locale; # make \w work right in non-ASCII lands =head1 NAME @@ -257,8 +258,6 @@ my %Pages = (); # associative array used to find the location my $Curdir = File::Spec->curdir; -init_globals(); - sub init_globals { $Cachedir = "."; # The directory to which directory caches # will be written. @@ -367,6 +366,9 @@ sub pod2html { # set options for input parser my $parser = Pod::Simple::SimpleTree->new; + # Normalize whitespace indenting + $parser->strip_verbatim_indent(\&trim_leading_whitespace); + $parser->codes_in_verbatim(0); $parser->accept_targets(qw(html HTML)); $parser->no_errata_section(!$Poderrors); # note the inverse @@ -579,13 +581,12 @@ my $Saved_Cache_Key; sub get_cache { my($dircache, $podpath, $podroot, $recurse) = @_; - my @cache_key_args = @_; # A first-level cache: # Don't bother reading the cache files if they still apply # and haven't changed since we last read them. - my $this_cache_key = cache_key(@cache_key_args); + my $this_cache_key = cache_key($dircache, $podpath, $podroot, $recurse); return 1 if $Saved_Cache_Key and $this_cache_key eq $Saved_Cache_Key; $Saved_Cache_Key = $this_cache_key; @@ -842,4 +843,24 @@ sub relativize_url { return $rel_path; } +# Remove any level of indentation (spaces or tabs) from each code block consistently +# Adapted from: https://metacpan.org/source/HAARG/MetaCPAN-Pod-XHTML-0.002001/lib/Pod/Simple/Role/StripVerbatimIndent.pm +sub trim_leading_whitespace { + my ($para) = @_; + + # Start by converting tabs to spaces + @$para = Text::Tabs::expand(@$para); + + # Find the line with the least amount of indent, as that's our "base" + my @indent_levels = (sort(map { $_ =~ /^( *)./mg } @$para)); + my $indent = $indent_levels[0] || ""; + + # Remove the "base" amount of indent from each line + foreach (@$para) { + $_ =~ s/^\Q$indent//mg; + } + + return; +} + 1; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple.pm index 6c91b8ac1f..f2544d0ef1 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple.pm @@ -18,11 +18,11 @@ use vars qw( ); @ISA = ('Pod::Simple::BlackBox'); -$VERSION = '3.40'; +$VERSION = '3.42'; @Known_formatting_codes = qw(I B C L E F S X Z); %Known_formatting_codes = map(($_=>1), @Known_formatting_codes); -@Known_directives = qw(head1 head2 head3 head4 item over back); +@Known_directives = qw(head1 head2 head3 head4 head5 head6 item over back); %Known_directives = map(($_=>'Plain'), @Known_directives); $NL = $/ unless defined $NL; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/BlackBox.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/BlackBox.pm index d115aee7e3..03dede7c34 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/BlackBox.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/BlackBox.pm @@ -22,7 +22,7 @@ use integer; # vroom! use strict; use Carp (); use vars qw($VERSION ); -$VERSION = '3.40'; +$VERSION = '3.42'; #use constant DEBUG => 7; sub my_qr ($$) { @@ -64,7 +64,7 @@ my $non_ascii_re = my_qr('[[:^ascii:]]', "\xB6"); $non_ascii_re = qr/[\x80-\xFF]/ unless $non_ascii_re; # Use patterns understandable by Perl 5.6, if possible -my $cs_re = my_qr('\p{IsCs}', "\x{D800}"); +my $cs_re = do { no warnings; my_qr('\p{IsCs}', "\x{D800}") }; my $cn_re = my_qr('\p{IsCn}', "\x{09E4}"); # code point unlikely # to get assigned my $rare_blocks_re = my_qr('[\p{InIPAExtensions}\p{InSpacingModifierLetters}]', @@ -139,10 +139,8 @@ sub parse_lines { # Usage: $parser->parse_lines(@lines) # An attempt to match the pod portions of a line. This is not fool proof, # but is good enough to serve as part of the heuristic for guessing the pod # encoding if not specified. - my $format_codes = join "", '[', grep { / ^ [A-Za-z] $/x } - keys %{$self->{accept_codes}}; - $format_codes .= ']'; - my $pod_chars_re = qr/ ^ = [A-Za-z]+ | $format_codes < /x; + my $codes = join '', grep { / ^ [A-Za-z] $/x } sort keys %{$self->{accept_codes}}; + my $pod_chars_re = qr/ ^ = [A-Za-z]+ | [\Q$codes\E] < /x; my $line; foreach my $source_line (@_) { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Checker.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Checker.pm index 2fef0305a5..65f4d54243 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Checker.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Checker.pm @@ -9,7 +9,7 @@ use Carp (); use Pod::Simple::Methody (); use Pod::Simple (); use vars qw( @ISA $VERSION ); -$VERSION = '3.40'; +$VERSION = '3.42'; @ISA = ('Pod::Simple::Methody'); BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG) ? \&Pod::Simple::DEBUG diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Debug.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Debug.pm index aaa5a887e6..6b9aa327c0 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Debug.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Debug.pm @@ -2,7 +2,7 @@ require 5; package Pod::Simple::Debug; use strict; use vars qw($VERSION ); -$VERSION = '3.40'; +$VERSION = '3.42'; sub import { my($value,$variable); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsText.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsText.pm index bade6fcc47..a22603043b 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsText.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsText.pm @@ -1,7 +1,7 @@ require 5; package Pod::Simple::DumpAsText; -$VERSION = '3.40'; +$VERSION = '3.42'; use Pod::Simple (); BEGIN {@ISA = ('Pod::Simple')} diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsXML.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsXML.pm index 6f0b7b1862..024e4b7b81 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsXML.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/DumpAsXML.pm @@ -1,7 +1,7 @@ require 5; package Pod::Simple::DumpAsXML; -$VERSION = '3.40'; +$VERSION = '3.42'; use Pod::Simple (); BEGIN {@ISA = ('Pod::Simple')} diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/HTML.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/HTML.pm index 0219b97910..f930a51217 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/HTML.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/HTML.pm @@ -9,7 +9,7 @@ use vars qw( $Doctype_decl $Content_decl ); @ISA = ('Pod::Simple::PullParser'); -$VERSION = '3.40'; +$VERSION = '3.42'; BEGIN { if(defined &DEBUG) { } # no-op elsif( defined &Pod::Simple::DEBUG ) { *DEBUG = \&Pod::Simple::DEBUG } @@ -109,10 +109,14 @@ my @_to_accept; 'head2' => "\n

", # '' 'head3' => "\n

", # '' 'head4' => "\n

", # '' + 'head5' => "\n

", # '' + 'head6' => "\n
", # '' '/head1' => "
\n", '/head2' => "\n", '/head3' => "\n", '/head4' => "\n", + '/head5' => "\n", + '/head6' => "\n", 'X' => "", @@ -224,7 +228,7 @@ sub __adjust_html_h_levels { return if ($self->{'Adjusted_html_h_levels'}||0) == $add; $add -= 1; - for (1 .. 4) { + for (1 .. 6) { $Tagmap->{"head$_"} =~ s/$_/$_ + $add/e; $Tagmap->{"/head$_"} =~ s/$_/$_ + $add/e; } @@ -323,7 +327,7 @@ sub version_tag_comment { "\n", esc( ref($self), $self->VERSION(), $ISA[0], $ISA[0]->VERSION(), - $], scalar(gmtime), + $], scalar(gmtime($ENV{SOURCE_DATE_EPOCH} || time)), ), $self->_modnote(), ; } diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/HTMLBatch.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/HTMLBatch.pm index 227d6d3af0..6a06173f47 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/HTMLBatch.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/HTMLBatch.pm @@ -5,7 +5,7 @@ use strict; use vars qw( $VERSION $HTML_RENDER_CLASS $HTML_EXTENSION $CSS $JAVASCRIPT $SLEEPY $SEARCH_CLASS @ISA ); -$VERSION = '3.40'; +$VERSION = '3.42'; @ISA = (); # Yup, we're NOT a subclass of Pod::Simple::HTML! # TODO: nocontents stylesheets. Strike some of the color variations? @@ -94,11 +94,11 @@ sub new { $new->contents_page_end( sprintf( - "\n\n

Generated by %s v%s under Perl v%s\n
At %s GMT, which is %s local time.

\n\n\n", + "\n\n

Generated by %s v%s under Perl v%s\n
At %s GMT.

\n\n\n", esc( ref($new), eval {$new->VERSION} || $VERSION, - $], scalar(gmtime), scalar(localtime), + $], scalar(gmtime($ENV{SOURCE_DATE_EPOCH} || time)), ))); return $new; @@ -871,7 +871,8 @@ $CSS = <<'EOCSS'; background-color: #000; } - body.pod h1, body.pod h2, body.pod h3, body.pod h4 { + body.pod h1, body.pod h2, body.pod h3, + body.pod h4, body.pod h5, body.pod h6 { font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; font-weight: normal; margin-top: 1.2em; @@ -884,11 +885,15 @@ $CSS = <<'EOCSS'; body.pod h2 { border-top-color: #080; } body.pod h3 { border-top-color: #040; } body.pod h4 { border-top-color: #010; } + body.pod h5 { border-top-color: #010; } + body.pod h6 { border-top-color: #010; } p.backlinktop + h1 { border-top: none; margin-top: 0em; } p.backlinktop + h2 { border-top: none; margin-top: 0em; } p.backlinktop + h3 { border-top: none; margin-top: 0em; } p.backlinktop + h4 { border-top: none; margin-top: 0em; } + p.backlinktop + h5 { border-top: none; margin-top: 0em; } + p.backlinktop + h6 { border-top: none; margin-top: 0em; } body.pod dt { font-size: 105%; /* just a wee bit more than normal */ diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/JustPod.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/JustPod.pm index c7ad3d6977..935c9e8282 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/JustPod.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/JustPod.pm @@ -74,6 +74,8 @@ sub start_head1 { shift->_generic_start('=head1', @_); } sub start_head2 { shift->_generic_start('=head2', @_); } sub start_head3 { shift->_generic_start('=head3', @_); } sub start_head4 { shift->_generic_start('=head4', @_); } +sub start_head5 { shift->_generic_start('=head5', @_); } +sub start_head6 { shift->_generic_start('=head6', @_); } sub start_encoding { shift->_generic_start('=encoding', @_); } # sub start_Para # sub start_Verbatim @@ -175,6 +177,8 @@ sub _end_generic { *end_head2 = *_end_generic; *end_head3 = *_end_generic; *end_head4 = *_end_generic; +*end_head5 = *_end_generic; +*end_head6 = *_end_generic; *end_encoding = *_end_generic; *end_Para = *_end_generic; *end_Verbatim = *_end_generic; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/LinkSection.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/LinkSection.pm index b9ca19cdf9..a6898caec4 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/LinkSection.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/LinkSection.pm @@ -6,7 +6,7 @@ package Pod::Simple::LinkSection; use strict; use Pod::Simple::BlackBox; use vars qw($VERSION ); -$VERSION = '3.40'; +$VERSION = '3.42'; use overload( # So it'll stringify nice '""' => \&Pod::Simple::BlackBox::stringify_lol, diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Methody.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Methody.pm index 5bcee54d4f..45e26cf463 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Methody.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Methody.pm @@ -4,7 +4,7 @@ package Pod::Simple::Methody; use strict; use Pod::Simple (); use vars qw(@ISA $VERSION); -$VERSION = '3.40'; +$VERSION = '3.42'; @ISA = ('Pod::Simple'); # Yes, we could use named variables, but I want this to be impose diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Progress.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Progress.pm index 3d6f403112..77de9ae86f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Progress.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Progress.pm @@ -1,7 +1,7 @@ require 5; package Pod::Simple::Progress; -$VERSION = '3.40'; +$VERSION = '3.42'; use strict; # Objects of this class are used for noting progress of an diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParser.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParser.pm index ceeb3f9250..57aad9ac08 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParser.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParser.pm @@ -1,6 +1,6 @@ require 5; package Pod::Simple::PullParser; -$VERSION = '3.40'; +$VERSION = '3.42'; use Pod::Simple (); BEGIN {@ISA = ('Pod::Simple')} diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserEndToken.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserEndToken.pm index d9ebdcbcf0..dbff3df249 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserEndToken.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserEndToken.pm @@ -5,7 +5,7 @@ use Pod::Simple::PullParserToken (); use strict; use vars qw(@ISA $VERSION); @ISA = ('Pod::Simple::PullParserToken'); -$VERSION = '3.40'; +$VERSION = '3.42'; sub new { # Class->new(tagname); my $class = shift; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserStartToken.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserStartToken.pm index 61608fb466..1ab33cc6e0 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserStartToken.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserStartToken.pm @@ -5,7 +5,7 @@ use Pod::Simple::PullParserToken (); use strict; use vars qw(@ISA $VERSION); @ISA = ('Pod::Simple::PullParserToken'); -$VERSION = '3.40'; +$VERSION = '3.42'; sub new { # Class->new(tagname, optional_attrhash); my $class = shift; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserTextToken.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserTextToken.pm index c8247a081e..cdce959db4 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserTextToken.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserTextToken.pm @@ -5,7 +5,7 @@ use Pod::Simple::PullParserToken (); use strict; use vars qw(@ISA $VERSION); @ISA = ('Pod::Simple::PullParserToken'); -$VERSION = '3.40'; +$VERSION = '3.42'; sub new { # Class->new(text); my $class = shift; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserToken.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserToken.pm index f14b5637cd..63a2dabe6f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserToken.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/PullParserToken.pm @@ -3,7 +3,7 @@ require 5; package Pod::Simple::PullParserToken; # Base class for tokens gotten from Pod::Simple::PullParser's $parser->get_token @ISA = (); -$VERSION = '3.40'; +$VERSION = '3.42'; use strict; sub new { # Class->new('type', stuff...); ## Overridden in derived classes anyway diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/RTF.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/RTF.pm index ed0de149ae..10e05c5d0a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/RTF.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/RTF.pm @@ -8,7 +8,7 @@ package Pod::Simple::RTF; use strict; use vars qw($VERSION @ISA %Escape $WRAP %Tagmap); -$VERSION = '3.40'; +$VERSION = '3.42'; use Pod::Simple::PullParser (); BEGIN {@ISA = ('Pod::Simple::PullParser')} @@ -494,7 +494,7 @@ END # None of the following things should need escaping, I dare say! $tag, $ISA[0], $ISA[0]->VERSION(), - $], scalar(gmtime), + $], scalar(gmtime($ENV{SOURCE_DATE_EPOCH} || time)), ; } diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Search.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Search.pm index a07d33b85a..ad610654c9 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Search.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Search.pm @@ -3,7 +3,7 @@ package Pod::Simple::Search; use strict; use vars qw($VERSION $MAX_VERSION_WITHIN $SLEEPY); -$VERSION = '3.40'; ## Current version of this package +$VERSION = '3.42'; ## Current version of this package BEGIN { *DEBUG = sub () {0} unless defined &DEBUG; } # set DEBUG level use Carp (); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/SimpleTree.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/SimpleTree.pm index 85dbabcd70..38a2704f87 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/SimpleTree.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/SimpleTree.pm @@ -5,7 +5,7 @@ use strict; use Carp (); use Pod::Simple (); use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS); -$VERSION = '3.40'; +$VERSION = '3.42'; BEGIN { @ISA = ('Pod::Simple'); *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Text.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Text.pm index de50b510ea..2f0254ec37 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Text.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Text.pm @@ -6,7 +6,7 @@ use Carp (); use Pod::Simple::Methody (); use Pod::Simple (); use vars qw( @ISA $VERSION $FREAKYMODE); -$VERSION = '3.40'; +$VERSION = '3.42'; @ISA = ('Pod::Simple::Methody'); BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG) ? \&Pod::Simple::DEBUG diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TextContent.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TextContent.pm index ad4172b7a3..ccbf424221 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TextContent.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TextContent.pm @@ -6,7 +6,7 @@ use strict; use Carp (); use Pod::Simple (); use vars qw( @ISA $VERSION ); -$VERSION = '3.40'; +$VERSION = '3.42'; @ISA = ('Pod::Simple'); sub new { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TiedOutFH.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TiedOutFH.pm index 0dd12c412d..cbf58b3706 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TiedOutFH.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TiedOutFH.pm @@ -4,7 +4,7 @@ package Pod::Simple::TiedOutFH; use Symbol ('gensym'); use Carp (); use vars qw($VERSION ); -$VERSION = '3.40'; +$VERSION = '3.42'; #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Transcode.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Transcode.pm index eb12702282..bdb7181af6 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Transcode.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/Transcode.pm @@ -3,7 +3,7 @@ require 5; package Pod::Simple::Transcode; use strict; use vars qw($VERSION @ISA); -$VERSION = '3.40'; +$VERSION = '3.42'; BEGIN { if(defined &DEBUG) {;} # Okay diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TranscodeDumb.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TranscodeDumb.pm index 2b675ccb78..96e6a54410 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TranscodeDumb.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TranscodeDumb.pm @@ -5,7 +5,7 @@ require 5; package Pod::Simple::TranscodeDumb; use strict; use vars qw($VERSION %Supported); -$VERSION = '3.40'; +$VERSION = '3.42'; # This module basically pretends it knows how to transcode, except # only for null-transcodings! We use this when Encode isn't # available. diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TranscodeSmart.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TranscodeSmart.pm index 99f55683ab..3f3224f917 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TranscodeSmart.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/TranscodeSmart.pm @@ -9,7 +9,7 @@ use strict; use Pod::Simple; require Encode; use vars qw($VERSION ); -$VERSION = '3.40'; +$VERSION = '3.42'; sub is_dumb {0} sub is_smart {1} diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/XHTML.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/XHTML.pm index b9c6269bf9..9049ce755f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/XHTML.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/XHTML.pm @@ -45,7 +45,7 @@ declare the output character set as UTF-8 before parsing, like so: package Pod::Simple::XHTML; use strict; use vars qw( $VERSION @ISA $HAS_HTML_ENTITIES ); -$VERSION = '3.40'; +$VERSION = '3.42'; use Pod::Simple::Methody (); @ISA = ('Pod::Simple::Methody'); @@ -400,6 +400,8 @@ sub start_head1 { $_[0]{'in_head'} = 1; $_[0]{htext} = ''; } sub start_head2 { $_[0]{'in_head'} = 2; $_[0]{htext} = ''; } sub start_head3 { $_[0]{'in_head'} = 3; $_[0]{htext} = ''; } sub start_head4 { $_[0]{'in_head'} = 4; $_[0]{htext} = ''; } +sub start_head5 { $_[0]{'in_head'} = 5; $_[0]{htext} = ''; } +sub start_head6 { $_[0]{'in_head'} = 6; $_[0]{htext} = ''; } sub start_item_number { $_[0]{'scratch'} = "\n" if ($_[0]{'in_li'}->[-1] && pop @{$_[0]{'in_li'}}); @@ -483,6 +485,8 @@ sub end_head1 { shift->_end_head(@_); } sub end_head2 { shift->_end_head(@_); } sub end_head3 { shift->_end_head(@_); } sub end_head4 { shift->_end_head(@_); } +sub end_head5 { shift->_end_head(@_); } +sub end_head6 { shift->_end_head(@_); } sub end_item_bullet { $_[0]{'scratch'} .= '

'; $_[0]->emit } sub end_item_number { $_[0]{'scratch'} .= '

'; $_[0]->emit } diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/XMLOutStream.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/XMLOutStream.pm index cb818a1740..a891a3341f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/XMLOutStream.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Simple/XMLOutStream.pm @@ -5,7 +5,7 @@ use strict; use Carp (); use Pod::Simple (); use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS); -$VERSION = '3.40'; +$VERSION = '3.42'; BEGIN { @ISA = ('Pod::Simple'); *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Usage.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Usage.pm index 8f7985040f..c290f2baf1 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Usage.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Pod/Usage.pm @@ -9,19 +9,19 @@ ############################################################################# package Pod::Usage; -use strict; -use vars qw($VERSION @ISA @EXPORT); -$VERSION = '1.69'; ## Current version of this package +use strict; require 5.006; ## requires this Perl version or later -#use diagnostics; use Carp; use Config; use Exporter; use File::Spec; -@EXPORT = qw(&pod2usage); +our $VERSION = '2.01'; + +our @EXPORT = qw(&pod2usage); +our @ISA; BEGIN { $Pod::Usage::Formatter ||= 'Pod::Text'; eval "require $Pod::Usage::Formatter"; @@ -103,13 +103,13 @@ sub pod2usage { my @paths = (ref $pathspec) ? @$pathspec : split($pathsep, $pathspec); for my $dirname (@paths) { - $_ = File::Spec->catfile($dirname, $basename) if length; + $_ = length($dirname) ? File::Spec->catfile($dirname, $basename) : $basename; last if (-e $_) && ($opts{'-input'} = $_); } } ## Now create a pod reader and constrain it to the desired sections. - my $parser = new Pod::Usage(USAGE_OPTIONS => \%opts); + my $parser = Pod::Usage->new(USAGE_OPTIONS => \%opts); if ($opts{'-verbose'} == 0) { $parser->select('(?:SYNOPSIS|USAGE)\s*'); } @@ -130,8 +130,8 @@ sub pod2usage { ## Check for perldoc my $progpath = $opts{'-perldoc'} ? $opts{'-perldoc'} : - File::Spec->catfile($Config{scriptdirexp} - || $Config{scriptdir}, 'perldoc'); + File::Spec->catfile($Config{scriptdirexp} || $Config{scriptdir}, + 'perldoc'); my $version = sprintf("%vd",$^V); if ($Config{versiononly} and $Config{startperl} =~ /\Q$version\E$/ ) { @@ -159,9 +159,17 @@ sub pod2usage { push @perldoc_cmd, ('-F', $f); unshift @perldoc_cmd, $opts{'-perlcmd'} if $opts{'-perlcmd'}; system(@perldoc_cmd); + # RT16091: fall back to more if perldoc failed if($?) { - # RT16091: fall back to more if perldoc failed - system(($Config{pager} || $ENV{PAGER} || '/bin/more'), $1); + # RT131844: prefer PAGER env + my $pager = $ENV{PAGER} || $Config{pager}; + if(defined($pager) && length($pager)) { + my $cmd = $pager . ' ' . ($^O =~ /win/i ? qq("$f") : quotemeta($f)); + system($cmd); + } else { + # the most humble fallback; should work (at least) on *nix and Win + system('more', $f); + } } } else { croak "Unspecified input file or insecure argument.\n"; @@ -275,7 +283,12 @@ sub select { sub seq_i { return $_[1] } # Override Pod::Text->cmd_i to return just "arg", not "*arg*". # newer version based on Pod::Simple -sub cmd_i { return $_[2] } +sub cmd_i { + my $self = shift; + # RT121489: highlighting should be there with Termcap + return $self->SUPER::cmd_i(@_) if $self->isa('Pod::Text::Termcap'); + return $_[1]; +} # This overrides the Pod::Text method to do something very akin to what # Pod::Select did as well as the work done below by preprocess_paragraph. @@ -373,13 +386,15 @@ sub preprocess_paragraph { __END__ +=for stopwords pod2usage verboseness downcased MSWin32 Marek Rouchal Christiansen ATOOMIC rjbs McDougall + =head1 NAME -Pod::Usage - print a usage message from embedded pod documentation +Pod::Usage - extracts POD documentation and shows usage information =head1 SYNOPSIS - use Pod::Usage + use Pod::Usage; my $message_text = "This text precedes the usage message."; my $exit_status = 2; ## The exit status to use @@ -391,13 +406,13 @@ Pod::Usage - print a usage message from embedded pod documentation pod2usage($exit_status); pod2usage( { -message => $message_text , - -exitval => $exit_status , - -verbose => $verbose_level, + -exitval => $exit_status , + -verbose => $verbose_level, -output => $filehandle } ); pod2usage( -msg => $message_text , - -exitval => $exit_status , - -verbose => $verbose_level, + -exitval => $exit_status , + -verbose => $verbose_level, -output => $filehandle ); pod2usage( -verbose => 2, @@ -443,39 +458,39 @@ keys: =item C<-msg> I The text of a message to print immediately prior to printing the -program's usage message. +program's usage message. =item C<-exitval> I The desired exit status to pass to the B function. -This should be an integer, or else the string "NOEXIT" to +This should be an integer, or else the string C to indicate that control should simply be returned without terminating the invoking process. =item C<-verbose> I The desired level of "verboseness" to use when printing the usage message. -If the value is 0, then only the "SYNOPSIS" section of the pod documentation -is printed. If the value is 1, then the "SYNOPSIS" section, along with any -section entitled "OPTIONS", "ARGUMENTS", or "OPTIONS AND ARGUMENTS" is -printed. If the corresponding value is 2 or more then the entire manpage is -printed, using L if available; otherwise L is used for -the formatting. For better readability, the all-capital headings are -downcased, e.g. C =E C. +If the value is 0, then only the "SYNOPSIS" and/or "USAGE" sections of the +pod documentation are printed. If the value is 1, then the "SYNOPSIS" and/or +"USAGE" sections, along with any section entitled "OPTIONS", "ARGUMENTS", or +"OPTIONS AND ARGUMENTS" is printed. If the corresponding value is 2 or more +then the entire manpage is printed, using L if available; otherwise +L is used for the formatting. For better readability, the +all-capital headings are downcased, e.g. C =E C. The special verbosity level 99 requires to also specify the -sections parameter; then these sections are extracted and printed. =item C<-sections> I -There are two ways to specify the selection. Either a string (scalar) +There are two ways to specify the selection. Either a string (scalar) representing a selection regexp for sections to be printed when -verbose is set to 99, e.g. "NAME|SYNOPSIS|DESCRIPTION|VERSION" With the above regexp all content following (and including) any of the -given C<=head1> headings will be shown. It is possible to restrict the +given C<=head1> headings will be shown. It is possible to restrict the output to particular subsections only, e.g.: "DESCRIPTION/Algorithm" @@ -484,7 +499,7 @@ This will output only the C<=head2 Algorithm> heading and content within the C<=head1 DESCRIPTION> section. The regexp binding is stronger than the section separator, such that e.g.: - "DESCRIPTION|OPTIONS|ENVIORNMENT/Caveats" + "DESCRIPTION|OPTIONS|ENVIRONMENT/Caveats" will print any C<=head2 Caveats> section (only) within any of the three C<=head1> sections. @@ -494,7 +509,7 @@ Alternatively, an array reference of section specifications can be used: pod2usage(-verbose => 99, -sections => [ qw(DESCRIPTION DESCRIPTION/Introduction) ] ); -This will print only the content of C<=head1 DESCRIPTION> and the +This will print only the content of C<=head1 DESCRIPTION> and the C<=head2 Introduction> sections, but no other C<=head2>, and no other C<=head1> either. @@ -528,17 +543,16 @@ MSWin32 and DOS). =item C<-noperldoc> -By default, Pod::Usage will call L when -verbose >= 2 is -specified. This does not work well e.g. if the script was packed -with L. The -noperldoc option suppresses the external call to -L and uses the simple text formatter (L) to -output the POD. +By default, Pod::Usage will call L when -verbose >= 2 is specified. +This does not work well e.g. if the script was packed with L. This option +suppresses the external call to L and uses the simple text formatter +(L) to output the POD. =item C<-perlcmd> By default, Pod::Usage will call L when -verbose >= 2 is specified. In case of special or unusual Perl installations, -the -perlcmd option may be used to supply the path to a L executable +this option may be used to supply the path to a L executable which should run L. =item C<-perldoc> I @@ -551,7 +565,7 @@ the correct path to L. =item C<-perldocopt> I By default, Pod::Usage will call L when -verbose >= 2 is specified. -The -perldocopt option may be used to supply options to L. The +This option may be used to supply options to L. The string may contain several, space-separated options. =back @@ -659,7 +673,7 @@ more verbose description of program usage in this case. =back -B doesn't force the above conventions upon you, but it will +B does not force the above conventions upon you, but it will use them by default if you don't expressly tell it to do otherwise. The ability of B to accept a single number or a string makes it convenient to use as an innocent looking error message handling function: @@ -848,7 +862,7 @@ things: By default, B will use C<$0> as the path to the pod input file. Unfortunately, not all systems on which Perl runs will set C<$0> -properly (although if C<$0> isn't found, B will search +properly (although if C<$0> is not found, B will search C<$ENV{PATH}> or else the list specified by the C<-pathlist> option). If this is the case for your system, you may need to explicitly specify the path to the pod docs for the invoking script using something @@ -865,23 +879,45 @@ the script: use FindBin; pod2usage(-input => $FindBin::Bin . "/" . $FindBin::Script); -=head1 AUTHOR +=head1 SUPPORT -Please report bugs using L. +This module is managed in a GitHub repository, +L Feel free to fork and contribute, or +to clone and send patches! + +Please use L to file a bug +report. The previous ticketing system, +L, is deprecated for +this package. + +More general questions or discussion about POD should be sent to the +C mail list. Send an empty email to +C to subscribe. + +=head1 AUTHOR Marek Rouchal Emarekr@cpan.orgE +Nicolas R Enicolas@atoomic.orgE + Brad Appleton Ebradapp@enteract.comE Based on code for B written by Tom Christiansen Etchrist@mox.perl.comE +=head1 LICENSE + +Pod::Usage (the distribution) is licensed under the same terms as Perl. + =head1 ACKNOWLEDGMENTS +Nicolas R (ATOOMIC) for setting up the Github repo and modernizing this +package. + rjbs for refactoring Pod::Usage to not use Pod::Parser any more. -Steven McDougall Eswmcd@world.std.comE for his help and patience -with re-writing this manpage. +Steven McDougall Eswmcd@world.std.comE for his help and patience with +re-writing this manpage. =head1 SEE ALSO -- cgit v1.2.3