diff --git a/MANIFEST b/MANIFEST index cb220c474715..feb0aa479289 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1943,6 +1943,8 @@ cpan/Pod-Simple/t/fcodes.t Pod::Simple test file cpan/Pod-Simple/t/fcodes_e.t Pod::Simple test file cpan/Pod-Simple/t/fcodes_l.t Pod::Simple test file cpan/Pod-Simple/t/fcodes_s.t Pod::Simple test file +cpan/Pod-Simple/t/filter.t Pod-Simple +cpan/Pod-Simple/t/filter-html.t Pod-Simple cpan/Pod-Simple/t/for.t Pod::Simple test file cpan/Pod-Simple/t/fornot.t Pod::Simple test file cpan/Pod-Simple/t/github_issue_79.t Test file related to Pod::Simple diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 1a94979aa4e1..04d741752f4b 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -965,8 +965,8 @@ package Maintainers; }, 'Pod::Simple' => { - 'DISTRIBUTION' => 'KHW/Pod-Simple-3.45.tar.gz', - 'SYNCINFO' => 'jkeenan on Wed Aug 2 19:32:39 2023', + 'DISTRIBUTION' => 'KHW/Pod-Simple-3.47.tar.gz', + 'SYNCINFO' => 'jkeenan on Fri May 23 17:15:52 2025', 'FILES' => q[cpan/Pod-Simple], 'EXCLUDED' => [ qw{.ChangeLog.swp}, diff --git a/cpan/Pod-Simple/lib/Pod/Simple.pm b/cpan/Pod-Simple/lib/Pod/Simple.pm index 9e521ad27449..a71cb54d7ecc 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple.pm @@ -11,9 +11,9 @@ use Pod::Simple::TiedOutFH; #use utf8; our @ISA = ('Pod::Simple::BlackBox'); -our $VERSION = '3.45'; +our $VERSION = '3.47'; -our @Known_formatting_codes = qw(I B C L E F S X Z); +our @Known_formatting_codes = qw(I B C L E F S U X Z); our %Known_formatting_codes = map(($_=>1), @Known_formatting_codes); our @Known_directives = qw(head1 head2 head3 head4 head5 head6 item over back); our %Known_directives = map(($_=>'Plain'), @Known_directives); @@ -33,8 +33,8 @@ BEGIN { die "MANY_LINES is too small (", MANY_LINES(), ")!\nAborting"; } if(defined &UNICODE) { } - elsif($] >= 5.008) { *UNICODE = sub() {1} } - else { *UNICODE = sub() {''} } + elsif( do { no integer; "$]" >= 5.008 } ) { *UNICODE = sub() {1} } + else { *UNICODE = sub() {''} } } if(DEBUG > 2) { print STDERR "# We are ", ASCII ? '' : 'not ', "in ASCII-land\n"; @@ -42,8 +42,8 @@ if(DEBUG > 2) { } # The NO BREAK SPACE and SOFT HYHPEN are used in several submodules. -if ($] ge 5.007_003) { # On sufficiently modern Perls we can handle any - # character set +if ( do { no integer; "$]" >= 5.007_003 } ) { # On sufficiently modern Perls we can handle any + # character set $Pod::Simple::nbsp = chr utf8::unicode_to_native(0xA0); $Pod::Simple::shy = chr utf8::unicode_to_native(0xAD); } @@ -754,7 +754,7 @@ sub _remap_sequences { ref($map->{$_}) ? join(",", @{$map->{$_}}) : $map->{$_} ), sort keys %$map ), - ("B~C~E~F~I~L~S~X~Z" eq join '~', sort keys %$map) + ("B~C~E~F~I~L~S~U~X~Z" eq join '~', sort keys %$map) ? " (all normal)\n" : "\n" ; diff --git a/cpan/Pod-Simple/lib/Pod/Simple.pod b/cpan/Pod-Simple/lib/Pod/Simple.pod index aa68ef1f4326..3e304f682b1a 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple.pod +++ b/cpan/Pod-Simple/lib/Pod/Simple.pod @@ -5,7 +5,19 @@ Pod::Simple - framework for parsing Pod =head1 SYNOPSIS - TODO + # using an existing formatter + use Pod::Simple::XHTML; + my $parser = Pod::Simple::XHTML->new; + $parser->parse_file('path/to/file.pod'); + + # creating a new formatter + package Pod::Simple::SomeFormatter; + use parent qw(Pod::Simple); + sub _handle_element_start { + my ($parser, $element_name, $attr_hash_r) = @_; + ... + } + ... =head1 DESCRIPTION @@ -256,7 +268,7 @@ effected. =item C<< $parser->accept_code( @codes ) >>X -Alias for L<< accept_codes >>. +Alias for L<< accept_codes|/$parser->accept_codes( @codes ) >>. =item C<< $parser->accept_codes( @codes ) >>X @@ -285,11 +297,11 @@ can be used to implement user-defined directives. =item C<< $parser->accept_target( @targets ) >>X -Alias for L<< accept_targets >>. +Alias for L<< accept_targets|/$parser->accept_targets( @targets ) >>. =item C<< $parser->accept_target_as_text( @targets ) >>X -Alias for L<< accept_targets_as_text >>. +Alias for L<< accept_targets_as_text|/$parser->accept_targets_as_text( @targets ) >>. =item C<< $parser->accept_targets( @targets ) >>X @@ -339,7 +351,7 @@ Log an error that can't be ignored. =item C<< $parser->unaccept_code( @codes ) >>X -Alias for L<< unaccept_codes >>. +Alias for L<< unaccept_codes|/$parser->unaccept_codes( @codes ) >>. =item C<< $parser->unaccept_codes( @codes ) >>X @@ -347,7 +359,7 @@ Removes C<< @codes >> as valid codes for the parse. =item C<< $parser->unaccept_directive( @directives ) >>X -Alias for L<< unaccept_directives >>. +Alias for L<< unaccept_directives|/$parser->unaccept_directives( @directives ) >>. =item C<< $parser->unaccept_directives( @directives ) >>X @@ -355,7 +367,7 @@ Removes C<< @directives >> as valid directives for the parse. =item C<< $parser->unaccept_target( @targets ) >>X -Alias for L<< unaccept_targets >>. +Alias for L<< unaccept_targets|/$parser->unaccept_targets( @targets ) >>. =item C<< $parser->unaccept_targets( @targets ) >>X diff --git a/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm b/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm index 242a4eb117ac..7a0ddf079c7f 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm @@ -22,7 +22,7 @@ use integer; # vroom! use strict; use warnings; use Carp (); -our $VERSION = '3.45'; +our $VERSION = '3.47'; #use constant DEBUG => 7; sub my_qr ($$) { @@ -35,7 +35,7 @@ sub my_qr ($$) { my ($input_re, $should_match) = @_; # XXX could have a third parameter $shouldnt_match for extra safety - my $use_utf8 = ($] le 5.006002) ? 'use utf8;' : ""; + my $use_utf8 = do { no integer; $] <= 5.006002 } ? 'use utf8;' : ""; my $re = eval "no warnings; $use_utf8 qr/$input_re/"; #print STDERR __LINE__, ": $input_re: $@\n" if $@; @@ -93,7 +93,7 @@ my $deprecated_re = my_qr('\p{IsDeprecated}', "\x{149}"); $deprecated_re = qr/\x{149}/ unless $deprecated_re; my $utf8_bom; -if (($] ge 5.007_003)) { +if ( do { no integer; "$]" >= 5.007_003 }) { $utf8_bom = "\x{FEFF}"; utf8::encode($utf8_bom); } else { @@ -266,13 +266,13 @@ sub parse_lines { # Usage: $parser->parse_lines(@lines) # XXX probably if the line has E that evaluates to illegal CP1252, # then it is UTF-8. But we haven't processed E<> yet. - goto set_1252 if $] lt 5.006_000; # No UTF-8 on very early perls + goto set_1252 if do { no integer; "$]" < 5.006_000 }; # No UTF-8 on very early perls my $copy; no warnings 'utf8'; - if ($] ge 5.007_003) { + if ( do { no integer; "$]" >= 5.007_003 } ) { $copy = $line; # On perls that have this function, we can use it to easily see if the @@ -286,7 +286,7 @@ sub parse_lines { # Usage: $parser->parse_lines(@lines) } else { # ASCII, no decode(): do it ourselves using the fundamental # characteristics of UTF-8 - use if $] le 5.006002, 'utf8'; + use if do { no integer; "$]" <= 5.006002 }, 'utf8'; my $char_ord; my $needed; # How many continuation bytes to gobble up @@ -601,6 +601,158 @@ sub parse_lines { # Usage: $parser->parse_lines(@lines) #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +sub _maybe_handle_element_start { + my $self = shift; + return $self->_handle_element_start(@_) + if !$self->{heading_filter}; + + my ($element_name, $attr) = @_; + + if ($element_name =~ /\Ahead(\d)\z/) { + $self->{_in_head} = { + element => $element_name, + level => $1 + 0, + events => [], + text => '', + }; + } + + if (my $head = $self->{_in_head}) { + push @{ $head->{events} }, [ '_handle_element_start', @_ ]; + return; + } + + return + if !$self->{_filter_allowed}; + + $self->_handle_element_start(@_); +} + +sub _maybe_handle_element_end { + my $self = shift; + return $self->_handle_element_end(@_) + if !$self->{heading_filter}; + + my ($element_name, $attr) = @_; + + if (my $head = $self->{_in_head}) { + if ($element_name ne $head->{element}) { + push @{ $head->{events} }, [ '_handle_element_end', @_ ]; + return; + } + + delete $self->{_in_head}; + + my $headings = $self->{_current_headings} ||= []; + @$headings = (@{$headings}[0 .. $head->{level} - 2], $head->{text}); + + my $allowed = $self->{_filter_allowed} = $self->_filter_allows(@$headings); + + if ($allowed) { + for my $event (@{ $head->{events} }) { + my ($method, @args) = @$event; + $self->$method(@args); + } + } + } + + return + if !$self->{_filter_allowed}; + + $self->_handle_element_end(@_); +} + +sub _maybe_handle_text { + my $self = shift; + return $self->_handle_text(@_) + if !$self->{heading_filter}; + + my ($text) = @_; + + if (my $head = $self->{_in_head}) { + push @{ $head->{events} }, [ '_handle_text', @_ ]; + $head->{text} .= $text; + return; + } + + return + if !$self->{_filter_allowed}; + + $self->_handle_text(@_); +} + +sub _filter_allows { + my $self = shift; + my @headings = @_; + + my $filter = $self->{heading_filter} + or return 1; + + SPEC: for my $spec ( @$filter ) { + for my $i (0 .. $#$spec) { + my $regex = $spec->[$i]; + my $heading = $headings[$i]; + $heading = '' + if !defined $heading; + next SPEC + if $heading !~ $regex; + } + return 1; + } + + return 0; +} + +sub set_heading_select { + my $self = shift; + my (@selections) = @_; + + my $filter = $self->{heading_filter} ||= []; + if (@selections && $selections[0] eq '+') { + shift @selections; + } + else { + @$filter = (); + } + + for my $spec (@selections) { + eval { + push @$filter, $self->_compile_heading_spec($spec); + 1; + } or do { + warn $@; + warn qq{Ignoring section spec "$spec"!\n}; + }; + } +} + +sub _compile_heading_spec { + my $self = shift; + my ($spec) = @_; + + my @bad; + my @parts = $spec =~ m{(?:\A|\G/)((?:[^/\\]|\\.)*)}g; + for my $part (@parts) { + $part =~ s{\\(.)}{$1}g; + my $negate = $part =~ s{\A!}{}; + $part = '.*' + if !length $part; + + eval { + $part = $negate ? qr{^(?!$part$)} : qr{^$part$}; + 1; + } or do { + push @bad, qq{Bad regular expression /$part/ in "$spec": $@\n}; + }; + } + + Carp::croak(join '', @bad) + if @bad; + + return \@parts; +} + + sub _handle_encoding_line { my($self, $line) = @_; @@ -1346,7 +1498,7 @@ sub _ponder_begin { DEBUG > 1 and print STDERR "Ignoring ignorable =begin\n"; } else { $self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'}; - $self->_handle_element_start((my $scratch='for'), $para->[1]); + $self->_maybe_handle_element_start((my $scratch='for'), $para->[1]); } return 1; @@ -1414,7 +1566,7 @@ sub _ponder_end { # what's that for? $self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'}; - $self->_handle_element_end( my $scratch = 'for', $para->[1]); + $self->_maybe_handle_element_end( my $scratch = 'for', $para->[1]); } DEBUG > 1 and print STDERR "Popping $curr_open->[-1][0] $curr_open->[-1][1]{'target'} because of =end $content\n"; pop @$curr_open; @@ -1536,7 +1688,7 @@ sub _ponder_over { DEBUG > 1 and print STDERR "=over found of type $list_type\n"; $self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'}; - $self->_handle_element_start((my $scratch = 'over-' . $list_type), $para->[1]); + $self->_maybe_handle_element_start((my $scratch = 'over-' . $list_type), $para->[1]); return; } @@ -1558,7 +1710,7 @@ sub _ponder_back { # Expected case: we're closing the most recently opened thing #my $over = pop @$curr_open; $self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'}; - $self->_handle_element_end( my $scratch = + $self->_maybe_handle_element_end( my $scratch = 'over-' . ( (pop @$curr_open)->[1]{'~type'} ), $para->[1] ); } else { @@ -1843,7 +1995,7 @@ sub _traverse_treelet_bit { # for use only by the routine above my($self, $name) = splice @_,0,2; my $scratch; - $self->_handle_element_start(($scratch=$name), shift @_); + $self->_maybe_handle_element_start(($scratch=$name), shift @_); while (@_) { my $x = shift; @@ -1851,11 +2003,11 @@ sub _traverse_treelet_bit { # for use only by the routine above &_traverse_treelet_bit($self, @$x); } else { $x .= shift while @_ && !ref($_[0]); - $self->_handle_text($x); + $self->_maybe_handle_text($x); } } - $self->_handle_element_end($scratch=$name); + $self->_maybe_handle_element_end($scratch=$name); return; } @@ -2426,7 +2578,7 @@ sub reinit { foreach (qw(source_dead source_filename doc_has_started start_of_pod_block content_seen last_was_blank paras curr_open line_count pod_para_count in_pod ~tried_gen_errata all_errata errata errors_seen -Title)) { +Title _current_headings _in_head _filter_allowed)) { delete $self->{$_}; } diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm b/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm index 884717402a96..5a4f490e464a 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm @@ -8,7 +8,7 @@ use warnings; use Carp (); use Pod::Simple::Methody (); use Pod::Simple (); -our $VERSION = '3.45'; +our $VERSION = '3.47'; our @ISA = ('Pod::Simple::Methody'); BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG) ? \&Pod::Simple::DEBUG diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm b/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm index 3d036b4e339a..5be7b3002802 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm @@ -1,6 +1,6 @@ package Pod::Simple::Debug; use strict; -our $VERSION = '3.45'; +our $VERSION = '3.47'; sub import { my($value,$variable); diff --git a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm index cf49bcfe2651..d93ddd99ca22 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm @@ -1,6 +1,6 @@ package Pod::Simple::DumpAsText; use strict; -our $VERSION = '3.45'; +our $VERSION = '3.47'; use Pod::Simple (); BEGIN { our @ISA = ('Pod::Simple')} diff --git a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm index 3205f90d4602..2df33b7240a7 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm @@ -1,6 +1,6 @@ package Pod::Simple::DumpAsXML; use strict; -our $VERSION = '3.45'; +our $VERSION = '3.47'; use Pod::Simple (); BEGIN {our @ISA = ('Pod::Simple')} @@ -67,7 +67,7 @@ sub _handle_element_end { sub _xml_escape { foreach my $x (@_) { # Escape things very cautiously: - if ($] ge 5.007_003) { + if ("$]" >= 5.007_003) { $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(utf8::native_to_unicode(ord($1))).';'/eg; } else { # Is broken for non-ASCII platforms on early perls $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg; diff --git a/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm b/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm index 04659fea0bd5..97cb1d2c48b2 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Pod::Simple::PullParser (); our @ISA = ('Pod::Simple::PullParser'); -our $VERSION = '3.45'; +our $VERSION = '3.47'; BEGIN { if(defined &DEBUG) { } # no-op elsif( defined &Pod::Simple::DEBUG ) { *DEBUG = \&Pod::Simple::DEBUG } @@ -35,8 +35,8 @@ $Perldoc_URL_Postfix = '' unless defined $Perldoc_URL_Postfix; -our $Man_URL_Prefix = 'http://man.he.net/man'; -our $Man_URL_Postfix = ''; +our $Man_URL_Prefix = 'https://man7.org/linux/man-pages/man'; +our $Man_URL_Postfix = '.html'; our $Title_Prefix; $Title_Prefix = '' unless defined $Title_Prefix; @@ -59,7 +59,7 @@ __PACKAGE__->_accessorize( # In turning L into http://whatever/man/1/crontab, what # to put before the "1/crontab". 'man_url_postfix', - # what to put after the "1/crontab" in the URL. Normally "". + # what to put after the "1/crontab" in the URL. Normally ".html". 'batch_mode', # whether we're in batch mode 'batch_mode_current_level', @@ -125,7 +125,7 @@ our %Tagmap = ( changes(qw( Para=p - B=b I=i + B=b I=i U=u over-bullet=ul over-number=ol over-text=dl @@ -164,6 +164,7 @@ our %Tagmap = ( 'B' => "", '/B' => "", 'I' => "", '/I' => "", + 'U' => "", '/U' => "", 'F' => "", '/F' => "", 'C' => "", '/C' => "", 'L' => "", # ideally never used! @@ -701,7 +702,7 @@ sub section_name_tidy { $section =~ s/^\s+//; $section =~ s/\s+$//; $section =~ tr/ /_/; - if ($] ge 5.006) { + if ("$]" >= 5.006) { $section =~ s/[[:cntrl:][:^ascii:]]//g; # drop crazy characters } elsif ('A' eq chr(65)) { # But not on early EBCDIC $section =~ tr/\x00-\x1F\x80-\x9F//d; @@ -724,7 +725,7 @@ sub general_url_escape { # A pretty conservative escaping, behoovey even for query components # of a URL (see RFC 2396) - if ($] ge 5.007_003) { + if ("$]" >= 5.007_003) { $string =~ s/([^-_\.!~*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/sprintf('%%%02X',utf8::native_to_unicode(ord($1)))/eg; } else { # Is broken for non-ASCII platforms on early perls $string =~ s/([^-_\.!~*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/sprintf('%%%02X',ord($1))/eg; @@ -796,7 +797,7 @@ sub resolve_man_page_link { $section ||= 1; return $self->man_url_prefix . "$section/" - . $self->manpage_url_escape($page) + . $self->manpage_url_escape($page) . ".$section" . $self->man_url_postfix; } @@ -862,7 +863,7 @@ sub esc { # a function. @_ = splice @_; # break aliasing } else { my $x = shift; - if ($] ge 5.007_003) { + if ("$]" >= 5.007_003) { $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(utf8::native_to_unicode(ord($1))).';'/eg; } else { # Is broken for non-ASCII platforms on early perls $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg; @@ -873,7 +874,7 @@ sub esc { # a function. foreach my $x (@_) { # Escape things very cautiously: if (defined $x) { - if ($] ge 5.007_003) { + if ("$]" >= 5.007_003) { $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(utf8::native_to_unicode(ord($1))).';'/eg } else { # Is broken for non-ASCII platforms on early perls $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg @@ -1135,14 +1136,6 @@ This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. -=head1 ACKNOWLEDGEMENTS - -Thanks to L for permission to use its -L site for man page links. - -Thanks to L for permission to use the -site for Perl module links. - =head1 AUTHOR Pod::Simple was created by Sean M. Burke . diff --git a/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm b/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm index 2dbf16c8df35..8b66fcfb21fe 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm @@ -1,6 +1,6 @@ package Pod::Simple::HTMLBatch; use strict; -our $VERSION = '3.45'; +our $VERSION = '3.47'; our @ISA = (); # Yup, we're NOT a subclass of Pod::Simple::HTML! # TODO: nocontents stylesheets. Strike some of the color variations? @@ -1112,7 +1112,7 @@ Example: =item $batchconv = Pod::Simple::HTMLBatch->new; This creates a new batch converter. The method doesn't take parameters. -To change the converter's attributes, use the L<"/ACCESSOR METHODS"> +To change the converter's attributes, use the L below. =item $batchconv->batch_convert( I, I ); diff --git a/cpan/Pod-Simple/lib/Pod/Simple/JustPod.pm b/cpan/Pod-Simple/lib/Pod/Simple/JustPod.pm index 113d54433218..fb49f0125291 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/JustPod.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/JustPod.pm @@ -214,6 +214,7 @@ sub start_E { _start_fcode('E', @_); } sub start_F { _start_fcode('F', @_); } sub start_I { _start_fcode('I', @_); } sub start_S { _start_fcode('S', @_); } +sub start_U { _start_fcode('U', @_); } sub start_X { _start_fcode('X', @_); } sub start_Z { _start_fcode('Z', @_); } @@ -242,6 +243,7 @@ sub _end_fcode { *end_F = *_end_fcode; *end_I = *_end_fcode; *end_S = *_end_fcode; +*end_U = *_end_fcode; *end_X = *_end_fcode; *end_Z = *_end_fcode; diff --git a/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm b/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm index d54e443fa6a8..f7631965e805 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm @@ -4,7 +4,7 @@ package Pod::Simple::LinkSection; use strict; use warnings; use Pod::Simple::BlackBox; -our $VERSION = '3.45'; +our $VERSION = '3.47'; use overload( # So it'll stringify nice '""' => \&Pod::Simple::BlackBox::stringify_lol, diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm b/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm index 0f0ad6826aa7..7ee0cecb0b57 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm @@ -2,7 +2,7 @@ package Pod::Simple::Methody; use strict; use warnings; use Pod::Simple (); -our $VERSION = '3.45'; +our $VERSION = '3.47'; our @ISA = ('Pod::Simple'); # Yes, we could use named variables, but I want this to be impose diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm b/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm index c0550a7eb438..d47604465f1a 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm @@ -2,7 +2,7 @@ package Pod::Simple::Progress; use strict; use warnings; -our $VERSION = '3.45'; +our $VERSION = '3.47'; # Objects of this class are used for noting progress of an # operation every so often. Messages delivered more often than that diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm index 305061181bee..fed5da75e692 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm @@ -1,6 +1,6 @@ package Pod::Simple::PullParser; use strict; -our $VERSION = '3.45'; +our $VERSION = '3.47'; use Pod::Simple (); BEGIN {our @ISA = ('Pod::Simple')} diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm index 3d439d253353..62b448f06e8f 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Pod::Simple::PullParserToken (); our @ISA = ('Pod::Simple::PullParserToken'); -our $VERSION = '3.45'; +our $VERSION = '3.47'; sub new { # Class->new(tagname); my $class = shift; diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm index fe27989e39a9..f7c016e4c7b5 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Pod::Simple::PullParserToken (); our @ISA = ('Pod::Simple::PullParserToken'); -our $VERSION = '3.45'; +our $VERSION = '3.47'; sub new { # Class->new(tagname, optional_attrhash); my $class = shift; diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm index 91eb38476207..7edc34fb9d86 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Pod::Simple::PullParserToken (); our @ISA = ('Pod::Simple::PullParserToken'); -our $VERSION = '3.45'; +our $VERSION = '3.47'; sub new { # Class->new(text); my $class = shift; diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm index f4cff3b23c04..865445d9abd2 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm @@ -1,7 +1,7 @@ package Pod::Simple::PullParserToken; # Base class for tokens gotten from Pod::Simple::PullParser's $parser->get_token our @ISA = (); -our $VERSION = '3.45'; +our $VERSION = '3.47'; use strict; sub new { # Class->new('type', stuff...); ## Overridden in derived classes anyway diff --git a/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm b/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm index e5f0e2c79afb..dbdcfd016afa 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm @@ -6,7 +6,7 @@ use warnings; #sub Pod::Simple::DEBUG () {4}; #sub Pod::Simple::PullParser::DEBUG () {4}; -our $VERSION = '3.45'; +our $VERSION = '3.47'; use Pod::Simple::PullParser (); our @ISA; BEGIN {@ISA = ('Pod::Simple::PullParser')} @@ -18,7 +18,7 @@ sub to_uni ($) { # Convert native code point to Unicode my $x = shift; # Broken for early EBCDICs - $x = chr utf8::native_to_unicode(ord $x) if $] ge 5.007_003 + $x = chr utf8::native_to_unicode(ord $x) if "$]" >= 5.007_003 && ord("A") != 65; return $x; } @@ -86,6 +86,7 @@ our %Tagmap = ( _openclose( 'B=cs18\b', 'I=cs16\i', + 'U=cs30\ul', 'C=cs19\f1\lang1024\noproof', 'F=cs17\i\lang1024\noproof', @@ -413,6 +414,7 @@ sub stylesheet { {\*\cs17 \additive \i\lang1024\noproof \sbasedon10 pod-F;} {\*\cs18 \additive \b \sbasedon10 pod-B;} {\*\cs19 \additive \f1\lang1024\noproof\sbasedon10 pod-C;} +{\*\cs30 \additive \ul \sbasedon10 pod-U;} {\s20\ql \li0\ri0\sa180\widctlpar\f1\fs%s\lang1024\noproof\sbasedon0 \snext0 pod-codeblock;} {\*\cs21 \additive \lang1024\noproof \sbasedon10 pod-computerese;} {\*\cs22 \additive \i\lang1024\noproof\sbasedon10 pod-L-pod;} @@ -549,7 +551,7 @@ my $other_unicode = Pod::Simple::BlackBox::my_qr('([\x{10000}-\x{10FFFF}])', "\x{10000}"); sub esc_uni($) { - use if $] le 5.006002, 'utf8'; + use if do { no integer; "$]" <= 5.006002 }, 'utf8'; my $x = shift; diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Search.pm b/cpan/Pod-Simple/lib/Pod/Simple/Search.pm index fa950d94977d..4ef3be8105cf 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Search.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Search.pm @@ -2,7 +2,7 @@ package Pod::Simple::Search; use strict; use warnings; -our $VERSION = '3.45'; ## Current version of this package +our $VERSION = '3.47'; ## Current version of this package BEGIN { *DEBUG = sub () {0} unless defined &DEBUG; } # set DEBUG level use Carp (); diff --git a/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm b/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm index ad3e1de38dae..a50152250bd4 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Carp (); use Pod::Simple (); -our $VERSION = '3.45'; +our $VERSION = '3.47'; BEGIN { our @ISA = ('Pod::Simple'); *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG; diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod b/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod index 97a01f63d8b2..28f47978fc7e 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod +++ b/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod @@ -38,10 +38,10 @@ existing Pod formatter, instead see its documentation and see also the docs in L. B in writing a Pod formatter is to make sure that there -isn't already a decent one in CPAN. See L, and +isn't already a decent one in CPAN. See L, and run a search on the name of the format you want to render to. Also consider joining the Pod People list -L and asking whether +L and asking whether anyone has a formatter for that format -- maybe someone cobbled one together but just hasn't released it. @@ -172,7 +172,7 @@ produces this event structure: in the document. -=item events with an element_name of B, C, F, or I. +=item events with an element_name of B, C, F, I, or U. Parsing a BE...E formatting code (or of course any of its semantically identical syntactic variants @@ -190,7 +190,7 @@ Parsing C, F, or I codes produce the same structure, with only a different element name. If your parser object has been set to accept other formatting codes, -then they will be presented like these B/C/F/I codes -- i.e., without +then they will be presented like these B/C/F/I/U codes -- i.e., without any attributes. =item events with an element_name of S @@ -212,7 +212,7 @@ means non-breaking space. =item events with an element_name of X Normally, parsing an XE...E sequence produces this event -structure, just as if it were a B/C/F/I code: +structure, just as if it were a B/C/F/I/U code: ...stuff... @@ -367,7 +367,7 @@ produces this event structure: In cases of links to a section in a different Pod document, -there are both a I
attribute and a L attribute. +there are both a I
attribute and a I attribute. For example, this Pod source: L @@ -775,7 +775,7 @@ At time of writing, I don't think you'll need to use this. =item C<< $parser->accept_codes( I, I... ) >> This tells the parser that you accept additional formatting codes, -beyond just the standard ones (I B C L F S X, plus the two weird ones +beyond just the standard ones (I B C L F S U X, plus the two weird ones you don't actually see in the parse tree, Z and E). For example, to also accept codes "N", "R", and "W": diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Text.pm b/cpan/Pod-Simple/lib/Pod/Simple/Text.pm index ec86a327320b..12c608507e60 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Text.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Text.pm @@ -4,7 +4,7 @@ use warnings; use Carp (); use Pod::Simple::Methody (); use Pod::Simple (); -our $VERSION = '3.45'; +our $VERSION = '3.47'; our @ISA = ('Pod::Simple::Methody'); BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG) ? \&Pod::Simple::DEBUG diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm b/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm index ad04bd1e1f09..260a64585433 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Carp (); use Pod::Simple (); -our $VERSION = '3.45'; +our $VERSION = '3.47'; our @ISA = ('Pod::Simple'); sub new { diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm b/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm index 60cb7cbb7525..6b691ce1f319 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Symbol ('gensym'); use Carp (); -our $VERSION = '3.45'; +our $VERSION = '3.47'; #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm b/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm index 9e68bdd902dc..c2785333ef44 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm @@ -1,6 +1,6 @@ package Pod::Simple::Transcode; use strict; -our $VERSION = '3.45'; +our $VERSION = '3.47'; BEGIN { if(defined &DEBUG) {;} # Okay diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm index 0777a193e62c..06dd42bb79c4 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm @@ -1,6 +1,6 @@ package Pod::Simple::TranscodeDumb; use strict; -our $VERSION = '3.45'; +our $VERSION = '3.47'; # 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/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm index 70a134151faa..d2bd0ff43fd4 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm @@ -7,7 +7,7 @@ use strict; use warnings; use Pod::Simple; use Encode; -our $VERSION = '3.45'; +our $VERSION = '3.47'; sub is_dumb {0} sub is_smart {1} diff --git a/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm b/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm index 05300a0cff25..07cee5da3cce 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm @@ -45,7 +45,7 @@ use warnings; package Pod::Simple::XHTML; use strict; -our $VERSION = '3.45'; +our $VERSION = '3.47'; use Pod::Simple::Methody (); our @ISA = ('Pod::Simple::Methody'); @@ -118,7 +118,7 @@ the call to C: =head2 perldoc_url_prefix -In turning L into http://whatever/Foo%3a%3aBar, what +In turning LEFoo::BarE into http://whatever/Foo%3a%3aBar, what to put before the "Foo%3a%3aBar". The default value is "https://metacpan.org/pod/". @@ -129,13 +129,14 @@ default. =head2 man_url_prefix -In turning C<< L >> into http://whatever/man/1/crontab, what -to put before the "1/crontab". The default value is -"http://man.he.net/man". +In turning C<< LEcrontab(5)E >> into http://whatever/man/1/crontab.1, what +to put before the "1/crontab.1". The default value is +"https://man7.org/linux/man-pages/man". =head2 man_url_postfix -What to put after "1/crontab" in the URL. This option is not set by default. +What to put after "1/crontab.1" in the URL. +This option is set to ".html" by default. =head2 title_prefix, title_postfix @@ -276,7 +277,8 @@ sub new { my $new = $self->SUPER::new(@_); $new->{'output_fh'} ||= *STDOUT{IO}; $new->perldoc_url_prefix('https://metacpan.org/pod/'); - $new->man_url_prefix('http://man.he.net/man'); + $new->man_url_prefix('https://man7.org/linux/man-pages/man'); + $new->man_url_postfix('.html'); $new->html_charset('ISO-8859-1'); $new->nix_X_codes(1); $new->{'scratch'} = ''; @@ -458,7 +460,7 @@ sub start_item_text { } sub start_over_bullet { $_[0]{'scratch'} = '