Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit ad72c0f

Browse files
committed
Pod-Simple-4.39c
merged with upstream 3.39 relaxed some str types
1 parent 0204c68 commit ad72c0f

34 files changed

+130
-76
lines changed

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4404,6 +4404,7 @@ dist/Pod-Simple/t/begin.t Pod::Simple test file
44044404
dist/Pod-Simple/t/cbacks.t Pod::Simple test file
44054405
dist/Pod-Simple/t/chunking.t Pod::Simple test file
44064406
dist/Pod-Simple/t/closeys.t Pod::Simple test file
4407+
dist/Pod-Simple/t/content_seen.t Pod::Simple test file
44074408
dist/Pod-Simple/t/corpus.t Pod::Simple test file
44084409
dist/Pod-Simple/t/corpus/2202jp.txt Pod::Simple test file
44094410
dist/Pod-Simple/t/corpus/2202jp.xml Pod::Simple test file

Porting/Maintainers.pl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,10 +1226,8 @@ package Maintainers;
12261226
},
12271227

12281228
'Pod::Simple' => {
1229-
'DISTRIBUTION' => 'KHW/Pod-Simple-3.38.tar.gz',
1229+
'DISTRIBUTION' => 'KHW/Pod-Simple-3.39.tar.gz',
12301230
'FILES' => q[dist/Pod-Simple],
1231-
# https://rt.cpan.org/Public/Bug/Display.html?id=103439
1232-
# https://rt.cpan.org/Public/Bug/Display.html?id=105192
12331231
# Modernized for cperl: https://github.com/rurban/pod-simple/tree/cperl
12341232
#'CUSTOMIZED' => [
12351233
# qw( dist/Pod-Simple/lib/Pod/Simple/Search.pm

dist/Module-CoreList/lib/Module/CoreList.pm

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18986,33 +18986,33 @@ our %delta :const = (
1898618986
'perlfaq' => '5.20190126',
1898718987
'Pod::Man' => '4.12',
1898818988
'Pod::ParseLink' => '4.12',
18989-
'Pod::Simple' => '4.38c',
18990-
'Pod::Simple::BlackBox' => '3.38',
18991-
'Pod::Simple::Checker' => '3.38',
18992-
'Pod::Simple::Debug' => '3.38',
18993-
'Pod::Simple::DumpAsText'=> '4.38c',
18989+
'Pod::Simple' => '4.39c',
18990+
'Pod::Simple::BlackBox' => '3.39',
18991+
'Pod::Simple::Checker' => '3.39',
18992+
'Pod::Simple::Debug' => '3.39',
18993+
'Pod::Simple::DumpAsText'=> '4.39c',
1899418994
'Pod::Simple::DumpAsXML'=> '4.36c',
18995-
'Pod::Simple::HTML' => '4.38c',
18996-
'Pod::Simple::HTMLBatch'=> '3.38',
18997-
'Pod::Simple::LinkSection'=> '3.38',
18998-
'Pod::Simple::Methody' => '4.38c',
18999-
'Pod::Simple::Progress' => '3.38',
19000-
'Pod::Simple::PullParser'=> '4.38c',
19001-
'Pod::Simple::PullParserEndToken'=> '3.38',
19002-
'Pod::Simple::PullParserStartToken'=> '3.38',
19003-
'Pod::Simple::PullParserTextToken'=> '3.38',
19004-
'Pod::Simple::PullParserToken'=> '3.38',
19005-
'Pod::Simple::RTF' => '3.38',
19006-
'Pod::Simple::Search' => '3.38',
19007-
'Pod::Simple::SimpleTree'=> '3.38',
19008-
'Pod::Simple::Text' => '3.38',
19009-
'Pod::Simple::TextContent'=> '3.38',
19010-
'Pod::Simple::TiedOutFH'=> '3.38',
19011-
'Pod::Simple::Transcode'=> '3.38',
19012-
'Pod::Simple::TranscodeDumb'=> '3.38',
19013-
'Pod::Simple::TranscodeSmart'=> '3.38',
19014-
'Pod::Simple::XHTML' => '3.38',
19015-
'Pod::Simple::XMLOutStream'=> '4.38c',
18995+
'Pod::Simple::HTML' => '4.39c',
18996+
'Pod::Simple::HTMLBatch'=> '3.39',
18997+
'Pod::Simple::LinkSection'=> '3.39',
18998+
'Pod::Simple::Methody' => '4.39c',
18999+
'Pod::Simple::Progress' => '3.39',
19000+
'Pod::Simple::PullParser'=> '4.39c',
19001+
'Pod::Simple::PullParserEndToken'=> '3.39',
19002+
'Pod::Simple::PullParserStartToken'=> '3.39',
19003+
'Pod::Simple::PullParserTextToken'=> '3.39',
19004+
'Pod::Simple::PullParserToken'=> '3.39',
19005+
'Pod::Simple::RTF' => '3.39',
19006+
'Pod::Simple::Search' => '3.39',
19007+
'Pod::Simple::SimpleTree'=> '3.39',
19008+
'Pod::Simple::Text' => '3.39',
19009+
'Pod::Simple::TextContent'=> '3.39',
19010+
'Pod::Simple::TiedOutFH'=> '3.39',
19011+
'Pod::Simple::Transcode'=> '3.39',
19012+
'Pod::Simple::TranscodeDumb'=> '3.39',
19013+
'Pod::Simple::TranscodeSmart'=> '3.39',
19014+
'Pod::Simple::XHTML' => '3.39',
19015+
'Pod::Simple::XMLOutStream'=> '4.39c',
1901619016
'Pod::Text' => '4.12',
1901719017
'Pod::Text::Color' => '4.12',
1901819018
'Pod::Text::Overstrike' => '4.12',

dist/Pod-Simple/lib/Pod/Simple.pm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
require 5;
23
package Pod::Simple;
34
use strict;
@@ -10,15 +11,15 @@ use Pod::Simple::BlackBox ();
1011
#use utf8;
1112

1213
use vars qw(
13-
$VERSION @ISA
14+
@ISA
1415
@Known_formatting_codes @Known_directives
1516
%Known_formatting_codes %Known_directives
1617
$NL
1718
);
1819

1920
@ISA = ('Pod::Simple::BlackBox');
2021
use cperl;
21-
our $VERSION = '4.38c'; # modernized
22+
our $VERSION = '4.39c'; # modernized
2223
$VERSION =~ s/c$//;
2324

2425
@Known_formatting_codes = qw(I B C L E F S X Z);
@@ -252,13 +253,13 @@ sub _handle_text ($self, $text) {
252253
#
253254
# And now directives (not targets)
254255

255-
sub accept_directive_as_verbatim ($self, @args) {
256+
sub accept_directive_as_verbatim ($self, @args) {
256257
$self->_accept_directives('Verbatim', @args)
257258
}
258259
sub accept_directive_as_data ($self, @args) {
259260
$self->_accept_directives('Data', @args)
260261
}
261-
sub accept_directive_as_processed ($self, @args) {
262+
sub accept_directive_as_processed ($self, @args) {
262263
$self->_accept_directives('Plain', @args)
263264
}
264265

dist/Pod-Simple/lib/Pod/Simple.pod

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ Be sure to read L</ENCODING> if your Pod contains non-ASCII characters.
1919
Pod formatters can use Pod::Simple to parse Pod documents and render them into
2020
plain text, HTML, or any number of other formats. Typically, such formatters
2121
will be subclasses of Pod::Simple, and so they will inherit its methods, like
22-
C<parse_file>.
22+
C<parse_file>. But note that Pod::Simple doesn't understand and
23+
properly parse Perl itself, so if you have a file which contains a Perl
24+
program that has a multi-line quoted string which has lines that look
25+
like pod, Pod::Simple will treat them as pod. This can be avoided if
26+
the file makes these into indented here documents instead.
2327

2428
If you're reading this document just because you have a Pod-processing
2529
subclass that you want to use, this document (plus the documentation for the
@@ -390,8 +394,8 @@ This module is managed in an open GitHub repository,
390394
L<https://github.com/perl-pod/pod-simple/>. Feel free to fork and contribute, or
391395
to clone L<git://github.com/perl-pod/pod-simple.git> and send patches!
392396

393-
Patches against Pod::Simple are welcome. Please send bug reports to
394-
<bug-pod-simple@rt.cpan.org>.
397+
Please use L<https://github.com/perl-pod/pod-simple/issues/new> to file a bug
398+
report.
395399

396400
=head1 COPYRIGHT AND DISCLAIMERS
397401

@@ -419,6 +423,8 @@ Pod::Simple is maintained by:
419423

420424
=item * David E. Wheeler C<dwheeler@cpan.org>
421425

426+
=item * Karl Williamson C<khw@cpan.org>
427+
422428
=back
423429

424430
Documentation has been contributed by:

dist/Pod-Simple/lib/Pod/Simple/BlackBox.pm

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use integer; # vroom!
2222
use strict;
2323
use Carp ();
2424
use vars qw($VERSION );
25-
$VERSION = '3.38';
25+
$VERSION = '3.39';
2626
#use constant DEBUG => 7;
2727

2828
sub my_qr ($$) {
@@ -100,6 +100,11 @@ if (($] ge 5.007_003)) {
100100
$utf8_bom = "\xEF\xBB\xBF"; # No EBCDIC BOM detection for early Perls.
101101
}
102102

103+
# This is used so that the 'content_seen' method doesn't return true on a
104+
# file that just happens to have a line that matches /^=[a-zA-z]/. Only if
105+
# there is a valid =foo line will we return that content was seen.
106+
my $seen_legal_directive = 0;
107+
103108
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
104109

105110
sub parse_line { shift->parse_lines(@_) } # alias
@@ -859,6 +864,10 @@ sub _ponder_paragraph_buffer {
859864

860865
my($para, $para_type);
861866
while(@$paras) {
867+
868+
# If a directive, assume it's legal; subtract below if found not to be
869+
$seen_legal_directive++ if $paras->[0][0] =~ /^=/;
870+
862871
last if @$paras == 1
863872
and ( $paras->[0][0] eq '=over'
864873
or $paras->[0][0] eq '=item'
@@ -1148,6 +1157,7 @@ sub _ponder_paragraph_buffer {
11481157
DEBUG > 1 and print STDERR " Pondering known directive ${$para}[0] as $para_type\n";
11491158
} else {
11501159
# An unknown directive!
1160+
$seen_legal_directive--;
11511161
DEBUG > 1 and printf STDERR "Unhandled directive %s (Handled: %s)\n",
11521162
$para->[0], join(' ', sort keys %{$self->{'accept_directives'}} )
11531163
;
@@ -1208,7 +1218,8 @@ sub _ponder_paragraph_buffer {
12081218
DEBUG and print STDERR "\n", pretty($para), "\n";
12091219

12101220
# traverse the treelet (which might well be just one string scalar)
1211-
$self->{'content_seen'} ||= 1;
1221+
$self->{'content_seen'} ||= 1 if $seen_legal_directive
1222+
&& ! $self->{'~tried_gen_errata'};
12121223
$self->_traverse_treelet_bit(@$para);
12131224
}
12141225
}
@@ -1336,7 +1347,7 @@ sub _ponder_begin {
13361347
if(!$dont_ignore or scalar grep $_->[1]{'~ignore'}, @$curr_open) {
13371348
DEBUG > 1 and print STDERR "Ignoring ignorable =begin\n";
13381349
} else {
1339-
$self->{'content_seen'} ||= 1;
1350+
$self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'};
13401351
$self->_handle_element_start((my $scratch='for'), $para->[1]);
13411352
}
13421353

@@ -1404,7 +1415,7 @@ sub _ponder_end {
14041415
$curr_open->[-1][1]{'start_line'} = $para->[1]{'start_line'};
14051416
# what's that for?
14061417

1407-
$self->{'content_seen'} ||= 1;
1418+
$self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'};
14081419
$self->_handle_element_end( my $scratch = 'for', $para->[1]);
14091420
}
14101421
DEBUG > 1 and print STDERR "Popping $curr_open->[-1][0] $curr_open->[-1][1]{'target'} because of =end $content\n";
@@ -1468,7 +1479,7 @@ sub _ponder_pod {
14681479

14691480
# The surrounding methods set content_seen, so let us remain consistent.
14701481
# I do not know why it was not here before -- should it not be here?
1471-
# $self->{'content_seen'} ||= 1;
1482+
# $self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'};
14721483

14731484
return;
14741485
}
@@ -1526,7 +1537,7 @@ sub _ponder_over {
15261537
}
15271538
DEBUG > 1 and print STDERR "=over found of type $list_type\n";
15281539

1529-
$self->{'content_seen'} ||= 1;
1540+
$self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'};
15301541
$self->_handle_element_start((my $scratch = 'over-' . $list_type), $para->[1]);
15311542

15321543
return;
@@ -1548,7 +1559,7 @@ sub _ponder_back {
15481559
DEBUG > 1 and print STDERR "=back happily closes matching =over\n";
15491560
# Expected case: we're closing the most recently opened thing
15501561
#my $over = pop @$curr_open;
1551-
$self->{'content_seen'} ||= 1;
1562+
$self->{'content_seen'} ||= 1 unless $self->{'~tried_gen_errata'};
15521563
$self->_handle_element_end( my $scratch =
15531564
'over-' . ( (pop @$curr_open)->[1]{'~type'} ), $para->[1]
15541565
);

dist/Pod-Simple/lib/Pod/Simple/Checker.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use Carp ();
99
use Pod::Simple::Methody ();
1010
use Pod::Simple ();
1111
use vars qw( @ISA $VERSION );
12-
$VERSION = '3.38';
12+
$VERSION = '3.39';
1313
@ISA = ('Pod::Simple::Methody');
1414
BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG)
1515
? \&Pod::Simple::DEBUG

dist/Pod-Simple/lib/Pod/Simple/Debug.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require 5;
22
package Pod::Simple::Debug;
33
use strict;
44
use vars qw($VERSION );
5-
$VERSION = '3.38';
5+
$VERSION = '3.39';
66

77
sub import {
88
my($value,$variable);

dist/Pod-Simple/lib/Pod/Simple/DumpAsText.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 5;
33
package Pod::Simple::DumpAsText;
44
use cperl;
5-
our $VERSION = '4.38c'; # modernized
5+
our $VERSION = '4.39c'; # modernized
66
$VERSION =~ s/c$//;
77
use Pod::Simple ();
88
BEGIN {@ISA = ('Pod::Simple')}

dist/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 5;
33
package Pod::Simple::DumpAsXML;
44
use cperl;
5-
our $VERSION = '4.38c'; # modernized
5+
our $VERSION = '4.39c'; # modernized
66
$VERSION =~ s/c$//;
77
use Pod::Simple ();
88
BEGIN {@ISA = ('Pod::Simple')}

0 commit comments

Comments
 (0)