summaryrefslogtreecommitdiff
path: root/cpan/Pod-Simple
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-02-28 15:23:20 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-02-28 15:23:20 +0000
commit9dd0d3936597070001bcc933b4415b1e113437ee (patch)
treecb85120b6b1adf61bb2bfbaea4cf84980a714ef3 /cpan/Pod-Simple
parent46b428ce5128df764ce460c744a3c4f0f9727b5b (diff)
downloadperl-9dd0d3936597070001bcc933b4415b1e113437ee.tar.gz
Update Pod-Simple to CPAN version 3.26
[DELTA] 2013-02-27 David E. Wheeler <david@justatheory.org> * Release 3.26 Fixed another test script to skip all tests when Encode is not installed. Added 'encoding()' and 'detected_encoding()' to return the current encoding and the encoding actually to decode the input file. The value from "=encoding" is also now kept in the output tree. Patch from Patrice Dumas (RT #74390). 2013-02-16 David E. Wheeler <david@justatheory.org> * Release 3.25 Improved the warning when "=item" types mismatch within one "=over"/"=back" block. 2013-02-14 David E. Wheeler <david@justatheory.org> * Release 3.24 Fixed corner case bug for unlikely scenario in which non-UTF-8 text could be parsed as UTF-8. Grant McLean. XHTML IDs can no longer end with punctuation. Thanks to Smylers for the patch. Fixed test failure on Perl 5.6.2. Changed the default installation location from "perl" to "site" on 5.12 and higher, since as of that version of Perl, dual-life modules no longer need to be installed in "perl" to replace in-core versions. Patch from tzccinct. Fixed hash order dependency test failures on Perl 5.17. Thanks to Yves Orton for the patch. Inlined the code that tries to guess a Pod file's encoding. This reduces the time Pod::Simple takes to build the core Perl documentation by 15-20%. Thanks to Dagfinn Ilmari Mannsåker for the patch! Added a warning when "=item" types mismatch within one "=over"/"=back" block. Marc Green/Google Summer of Code, with assist from RJBS. Fixed regression introduced in 3.22 in which "C< >" tags were incorrectly treated as verbatim text in table of contents items emitted by Pod::Simple::XHTML. Thanks to Randy Stauner for the report and to Thomas Sibley for the fix! Loosened up the matching of "L< >" tags for man pages so that they allow names with dots, underscores, and any other chararacters other than "/", just so long as they end in '[(][-a-zA-Z0-9]+[)]'. Thanks to Dave Rolsky and Kevin Ryde for the reports (RT #82975 & RT #82972). Fixed inverted mapping of "keyboard" to "kbd" in Pod::Simple::HTML. Thanks to Robert Boisvert for the bug report (RT #79201). Added two new Tagmap entries to Pod::Simple::HTML: "preformat" maps to "pre", and "teletype" maps to "tt". Suggested by Robert Boisvert (RT #79201). "X< >" tags are now ignored by the pull parser when it searches for titles, as is any trailing whitespace. Thanks to Patrice Dumas for the report (RT #74389).
Diffstat (limited to 'cpan/Pod-Simple')
-rw-r--r--cpan/Pod-Simple/ChangeLog68
-rw-r--r--cpan/Pod-Simple/README4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple.pm35
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple.pod12
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm71
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Checker.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Debug.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/HTML.pm8
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm6
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm6
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Methody.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Progress.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm21
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/RTF.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Search.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Text.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm6
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm22
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm4
-rw-r--r--cpan/Pod-Simple/t/closeys.t1
-rw-r--r--cpan/Pod-Simple/t/corpus/2202jp.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/2202jpx.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/2202jpy.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/2202jpz.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/8859_7.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/cp1256.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/encwarn03.txt12
-rw-r--r--cpan/Pod-Simple/t/corpus/encwarn03.xml2
-rw-r--r--cpan/Pod-Simple/t/corpus/encwarn04.txt17
-rw-r--r--cpan/Pod-Simple/t/corpus/encwarn04.xml27
-rw-r--r--cpan/Pod-Simple/t/corpus/fet_cont.xml6
-rw-r--r--cpan/Pod-Simple/t/corpus/fet_dup.xml6
-rw-r--r--cpan/Pod-Simple/t/corpus/iso6.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/koi8r.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/laozi38.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/laozi38b.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/laozi38p.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/lat1fr.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/pasternak_cp1251.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/plain_explicit.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/plain_latin1.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/plain_utf8.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/polish_utf8.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/s2763_sjis.xml3
-rw-r--r--cpan/Pod-Simple/t/corpus/thai_iso11.xml3
-rw-r--r--cpan/Pod-Simple/t/enc-chars.t61
-rw-r--r--cpan/Pod-Simple/t/encod04.t143
-rw-r--r--cpan/Pod-Simple/t/fcodes_l.t10
-rw-r--r--cpan/Pod-Simple/t/items.t4
-rw-r--r--cpan/Pod-Simple/t/items02.t90
-rw-r--r--cpan/Pod-Simple/t/pulltitl.t10
-rw-r--r--cpan/Pod-Simple/t/xhtml-bkb.t21
-rw-r--r--cpan/Pod-Simple/t/xhtml01.t14
-rw-r--r--cpan/Pod-Simple/t/xhtml10.t20
-rw-r--r--cpan/Pod-Simple/t/xhtml20.t2
67 files changed, 678 insertions, 154 deletions
diff --git a/cpan/Pod-Simple/ChangeLog b/cpan/Pod-Simple/ChangeLog
index 0fe203e4f4..c6bc739258 100644
--- a/cpan/Pod-Simple/ChangeLog
+++ b/cpan/Pod-Simple/ChangeLog
@@ -1,6 +1,74 @@
# ChangeLog for Pod::Simple dist
#---------------------------------------------------------------------------
+2013-02-27 David E. Wheeler <david@justatheory.org>
+ * Release 3.26
+
+ Fixed another test script to skip all tests when Encode is not
+ installed.
+
+ Added 'encoding()' and 'detected_encoding()' to return the current
+ encoding and the encoding actually to decode the input file. The
+ value from "=encoding" is also now kept in the output tree. Patch
+ from Patrice Dumas (RT #74390).
+
+2013-02-16 David E. Wheeler <david@justatheory.org>
+ * Release 3.25
+
+ Improved the warning when "=item" types mismatch within one
+ "=over"/"=back" block.
+
+2013-02-14 David E. Wheeler <david@justatheory.org>
+ * Release 3.24
+
+ Fixed corner case bug for unlikely scenario in which non-UTF-8
+ text could be parsed as UTF-8. Grant McLean.
+
+ XHTML IDs can no longer end with punctuation. Thanks to Smylers
+ for the patch.
+
+ Fixed test failure on Perl 5.6.2.
+
+ Changed the default installation location from "perl" to "site" on
+ 5.12 and higher, since as of that version of Perl, dual-life
+ modules no longer need to be installed in "perl" to replace
+ in-core versions. Patch from tzccinct.
+
+ Fixed hash order dependency test failures on Perl 5.17. Thanks to
+ Yves Orton for the patch.
+
+ Inlined the code that tries to guess a Pod file's encoding. This
+ reduces the time Pod::Simple takes to build the core Perl
+ documentation by 15-20%. Thanks to Dagfinn Ilmari Mannsåker for
+ the patch!
+
+ Added a warning when "=item" types mismatch within one
+ "=over"/"=back" block. Marc Green/Google Summer of Code, with
+ assist from RJBS.
+
+ Fixed regression introduced in 3.22 in which "C< >" tags were
+ incorrectly treated as verbatim text in table of contents items
+ emitted by Pod::Simple::XHTML. Thanks to Randy Stauner for the
+ report and to Thomas Sibley for the fix!
+
+ Loosened up the matching of "L< >" tags for man pages so that they
+ allow names with dots, underscores, and any other chararacters
+ other than "/", just so long as they end in '[(][-a-zA-Z0-9]+[)]'.
+ Thanks to Dave Rolsky and Kevin Ryde for the reports (RT #82975 &
+ RT #82972).
+
+ Fixed inverted mapping of "keyboard" to "kbd" in
+ Pod::Simple::HTML. Thanks to Robert Boisvert for the bug report
+ (RT #79201).
+
+ Added two new Tagmap entries to Pod::Simple::HTML: "preformat"
+ maps to "pre", and "teletype" maps to "tt". Suggested by Robert
+ Boisvert (RT #79201).
+
+ "X< >" tags are now ignored by the pull parser when it searches
+ for titles, as is any trailing whitespace. Thanks to Patrice Dumas
+ for the report (RT #74389).
+
2012-08-14 David E. Wheeler <david@justatheory.org>
* Release 3.23
diff --git a/cpan/Pod-Simple/README b/cpan/Pod-Simple/README
index be1517c5d1..83164e884c 100644
--- a/cpan/Pod-Simple/README
+++ b/cpan/Pod-Simple/README
@@ -1,4 +1,4 @@
-=head1 Pod::Simple version 3.23
+=head1 Pod::Simple version 3.26
Pod::Simple is a Perl library for parsing text in the Pod ("plain old
documentation") markup language that is typically used for writing
@@ -24,7 +24,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple.pm b/cpan/Pod-Simple/lib/Pod/Simple.pm
index fead5b5232..f1c7625a64 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple.pm
@@ -18,7 +18,7 @@ use vars qw(
);
@ISA = ('Pod::Simple::BlackBox');
-$VERSION = '3.23';
+$VERSION = '3.26';
@Known_formatting_codes = qw(I B C L E F S X Z);
%Known_formatting_codes = map(($_=>1), @Known_formatting_codes);
@@ -113,6 +113,35 @@ sub any_errata_seen { # good for using as an exit() value...
return shift->{'errors_seen'} || 0;
}
+# Returns the encoding only if it was recognized as being handled and set
+sub detected_encoding {
+ return shift->{'detected_encoding'};
+}
+
+sub encoding {
+ my $this = shift;
+ return $this->{'encoding'} unless @_; # GET.
+
+ $this->_handle_encoding_line("=encoding $_[0]");
+ if ($this->{'_processed_encoding'}) {
+ delete $this->{'_processed_encoding'};
+ if(! $this->{'encoding_command_statuses'} ) {
+ DEBUG > 2 and print " CRAZY ERROR: encoding wasn't really handled?!\n";
+ } elsif( $this->{'encoding_command_statuses'}[-1] ) {
+ $this->scream( "=encoding $_[0]",
+ sprintf "Couldn't do %s: %s",
+ $this->{'encoding_command_reqs' }[-1],
+ $this->{'encoding_command_statuses'}[-1],
+ );
+ } else {
+ DEBUG > 2 and print " (encoding successfully handled.)\n";
+ }
+ return $this->{'encoding'};
+ } else {
+ return undef;
+ }
+}
+
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Pull in some functions that, for some reason, I expect to see here too:
BEGIN {
@@ -1094,7 +1123,7 @@ sub _treat_Ls { # Process our dear dear friends, the L<...> sequences
# Catch some very simple and/or common cases
if(@{$ell} == 3 and ! ref $ell->[2]) {
my $it = $ell->[2];
- if($it =~ m/^[-a-zA-Z0-9]+\([-a-zA-Z0-9]+\)$/s) { # man sections
+ if($it =~ m{^[^/|]+[(][-a-zA-Z0-9]+[)]$}s) { # man sections
# Hopefully neither too broad nor too restrictive a RE
DEBUG > 1 and print "Catching \"$it\" as manpage link.\n";
$ell->[1]{'type'} = 'man';
@@ -1253,7 +1282,7 @@ sub _treat_Ls { # Process our dear dear friends, the L<...> sequences
# And the E resolver will have to deal with all our treeletty things:
if(@ell_content == 1 and !ref($ell_content[0])
- and $ell_content[0] =~ m/^[-a-zA-Z0-9]+\([-a-zA-Z0-9]+\)$/s
+ and $ell_content[0] =~ m{^[^/]+[(][-a-zA-Z0-9]+[)]$}s
) {
$ell->[1]{'type'} = 'man';
DEBUG > 3 and print "Considering this ($ell_content[0]) a man link.\n";
diff --git a/cpan/Pod-Simple/lib/Pod/Simple.pod b/cpan/Pod-Simple/lib/Pod/Simple.pod
index 0ead93b1a3..4edc08ed67 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple.pod
+++ b/cpan/Pod-Simple/lib/Pod/Simple.pod
@@ -289,6 +289,16 @@ I<Example:>
die "too many errors\n" if $parser->any_errata_seen();
+=item C<< $parser->detected_encoding() >>X<detected_encoding>
+
+Return the encoding corresponding to C<< =encoding >>, but only if the
+encoding was recognized and handled.
+
+=item C<< $parser->encoding() >>X<encoding>
+
+Return encoding of the document, even if the encoding is not correctly
+handled.
+
=item C<< $parser->parse_from_file( $source, $to ) >>X<parse_from_file>
Parses from C<$source> file to C<$to> file. Similar to L<<
@@ -373,7 +383,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm b/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm
index d3878f826d..99b629ee2e 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm
@@ -23,7 +23,7 @@ use integer; # vroom!
use strict;
use Carp ();
use vars qw($VERSION );
-$VERSION = '3.23';
+$VERSION = '3.26';
#use constant DEBUG => 7;
BEGIN {
require Pod::Simple;
@@ -91,6 +91,7 @@ sub parse_lines { # Usage: $parser->parse_lines(@lines)
if( ($line = $source_line) =~ s/^\xEF\xBB\xBF//s ) {
DEBUG and print "UTF-8 BOM seen. Faking a '=encoding utf8'.\n";
$self->_handle_encoding_line( "=encoding utf8" );
+ delete $self->{'_processed_encoding'};
$line =~ tr/\n\r//d;
} elsif( $line =~ s/^\xFE\xFF//s ) {
@@ -123,8 +124,21 @@ sub parse_lines { # Usage: $parser->parse_lines(@lines)
}
}
- if(!$self->parse_characters && !$self->{'encoding'}) {
- $self->_try_encoding_guess($line)
+ # Try to guess encoding. Inlined for performance reasons.
+ if(!$self->{'parse_characters'} && !$self->{'encoding'}
+ && ($self->{'in_pod'} || $line =~ /^=/s)
+ && $line =~ /[^\x00-\x7f]/
+ ) {
+ my $encoding = $line =~ /^[\x00-\x7f]*[\xC0-\xFD][\x80-\xBF]/ ? 'UTF-8' : 'ISO8859-1';
+ $self->_handle_encoding_line( "=encoding $encoding" );
+ $self->{'_transcoder'} && $self->{'_transcoder'}->($line);
+
+ my ($word) = $line =~ /(\S*[^\x00-\x7f]\S*)/;
+
+ $self->whine(
+ $self->{'line_count'},
+ "Non-ASCII character seen before =encoding in '$word'. Assuming $encoding"
+ );
}
DEBUG > 5 and print "# Parsing line: [$line]\n";
@@ -330,6 +344,7 @@ sub _handle_encoding_line {
$@ && die( $enc_error =
"Really unexpected error setting up encoding $e: $@\nAborting"
);
+ $self->{'detected_encoding'} = $e;
} else {
my @supported = Pod::Simple::Transcode::->all_encodings;
@@ -360,8 +375,13 @@ sub _handle_encoding_line {
$self->scream( $self->{'line_count'}, $enc_error );
}
push @{ $self->{'encoding_command_statuses'} }, $enc_error;
+ if (defined($self->{'_processed_encoding'})) {
+ # Should never happen
+ die "Nested processed encoding.";
+ }
+ $self->{'_processed_encoding'} = $orig;
- return '=encoding ALREADYDONE';
+ return $line;
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -377,7 +397,11 @@ sub _handle_encoding_second_level {
DEBUG > 2 and print "Ogling encoding directive: =encoding $content\n";
- if($content eq 'ALREADYDONE') {
+ if (defined($self->{'_processed_encoding'})) {
+ #if($content ne $self->{'_processed_encoding'}) {
+ # Could it happen?
+ #}
+ delete $self->{'_processed_encoding'};
# It's already been handled. Check for errors.
if(! $self->{'encoding_command_statuses'} ) {
DEBUG > 2 and print " CRAZY ERROR: It wasn't really handled?!\n";
@@ -401,28 +425,6 @@ sub _handle_encoding_second_level {
return;
}
-sub _try_encoding_guess {
- my ($self,$line) = @_;
-
- if(!$self->{'in_pod'} and $line !~ /^=/m) {
- return; # don't whine about non-ASCII bytes in code/comments
- }
-
- return unless $line =~ /[^\x00-\x7f]/; # Look for non-ASCII byte
-
- my $encoding = $line =~ /[\xC0-\xFD][\x80-\xBF]/ ? 'UTF-8' : 'ISO8859-1';
- $self->_handle_encoding_line( "=encoding $encoding" );
- $self->{'_transcoder'} && $self->{'_transcoder'}->($line);
-
- my ($word) = $line =~ /(\S*[^\x00-\x7f]\S*)/;
-
- $self->whine(
- $self->{'line_count'},
- "Non-ASCII character seen before =encoding in '$word'. Assuming $encoding"
- );
-
-}
-
#~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`
{
@@ -670,8 +672,10 @@ sub _ponder_paragraph_buffer {
if($item_type eq 'text') {
# Nothing special needs doing for 'text'
} elsif($item_type eq 'number' or $item_type eq 'bullet') {
- die "Unknown item type $item_type"
- unless $item_type eq 'number' or $item_type eq 'bullet';
+ $self->whine(
+ $para->[1]{'start_line'},
+ "Expected text after =item, not a $item_type"
+ );
# Undo our clobbering:
push @$para, $para->[1]{'~orig_content'};
delete $para->[1]{'number'};
@@ -800,8 +804,7 @@ sub _ponder_paragraph_buffer {
} elsif($para_type eq '=encoding') {
# Not actually acted on here, but we catch errors here.
$self->_handle_encoding_second_level($para);
-
- next; # and skip
+ $para_type = 'Plain';
} elsif($para_type eq '~Verbatim') {
$para->[0] = 'Verbatim';
$para_type = '?Verbatim';
@@ -1278,8 +1281,10 @@ sub _ponder_item {
if($item_type eq 'text') {
# Nothing special needs doing for 'text'
} elsif($item_type eq 'number' or $item_type eq 'bullet') {
- die "Unknown item type $item_type"
- unless $item_type eq 'number' or $item_type eq 'bullet';
+ $self->whine(
+ $para->[1]{'start_line'},
+ "Expected text after =item, not a $item_type"
+ );
# Undo our clobbering:
push @$para, $para->[1]{'~orig_content'};
delete $para->[1]{'number'};
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm b/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm
index 42c942ac8f..ecdbe72dee 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
@ISA = ('Pod::Simple::Methody');
BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG)
? \&Pod::Simple::DEBUG
@@ -159,7 +159,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm b/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm
index d9bd4e43a8..dc6437e086 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm
@@ -3,7 +3,7 @@ require 5;
package Pod::Simple::Debug;
use strict;
use vars qw($VERSION );
-$VERSION = '3.23';
+$VERSION = '3.26';
sub import {
my($value,$variable);
@@ -141,7 +141,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm
index c86d4ebd4e..8ee50a72a9 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm
@@ -1,7 +1,7 @@
require 5;
package Pod::Simple::DumpAsText;
-$VERSION = '3.23';
+$VERSION = '3.26';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
@@ -118,7 +118,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm
index 576ca7d369..4c252635a3 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm
@@ -1,7 +1,7 @@
require 5;
package Pod::Simple::DumpAsXML;
-$VERSION = '3.23';
+$VERSION = '3.26';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
@@ -127,7 +127,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm b/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm
index 528581e212..2378ad7fb3 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm
@@ -10,7 +10,7 @@ use vars qw(
$Doctype_decl $Content_decl
);
@ISA = ('Pod::Simple::PullParser');
-$VERSION = '3.23';
+$VERSION = '3.26';
BEGIN {
if(defined &DEBUG) { } # no-op
@@ -134,7 +134,7 @@ my @_to_accept;
qw[
sample=samp
definition=dfn
- kbd=keyboard
+ keyboard=kbd
variable=var
citation=cite
abbreviation=abbr
@@ -145,6 +145,8 @@ my @_to_accept;
small=small
underline=u
strikethrough=s
+ preformat=pre
+ teletype=tt
] # no point in providing a way to get <q>...</q>, I think
),
@@ -1089,7 +1091,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm b/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm
index 70e28edc20..8448a24bee 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
@ISA = (); # Yup, we're NOT a subclass of Pod::Simple::HTML!
# TODO: nocontents stylesheets. Strike some of the color variations?
@@ -1093,7 +1093,7 @@ Example:
% mkdir ../seekrut
% chmod og-rx ../seekrut
- % perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go . ../htmlversion
+ % perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go . ../seekrut
(to convert the pod under the current dir into HTML
files under the directory ./seekrut)
@@ -1333,7 +1333,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm b/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm
index fb80a59ba0..0b5dbaa843 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm
@@ -3,12 +3,12 @@ require 5;
package Pod::Simple::LinkSection;
# Based somewhat dimly on Array::Autojoin
use vars qw($VERSION );
-$VERSION = '3.23';
+$VERSION = '3.26';
use strict;
use Pod::Simple::BlackBox;
use vars qw($VERSION );
-$VERSION = '3.23';
+$VERSION = '3.26';
use overload( # So it'll stringify nice
'""' => \&Pod::Simple::BlackBox::stringify_lol,
@@ -137,7 +137,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm b/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm
index 2f6a52823f..c5090779d9 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
@ISA = ('Pod::Simple');
# Yes, we could use named variables, but I want this to be impose
@@ -115,7 +115,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm b/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm
index 9c0e9d9ce4..86ceaac2a9 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm
@@ -1,7 +1,7 @@
require 5;
package Pod::Simple::Progress;
-$VERSION = '3.23';
+$VERSION = '3.26';
use strict;
# Objects of this class are used for noting progress of an
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm
index 053fbf33f1..41f557cbcb 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm
@@ -1,7 +1,7 @@
require 5;
package Pod::Simple::PullParser;
-$VERSION = '3.23';
+$VERSION = '3.26';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
@@ -347,6 +347,7 @@ sub _get_titled_section {
my $head1_text_content;
my $para_text_content;
+ my $skipX;
while(
++$token_count <= ($max_token || 1_000_000)
@@ -364,8 +365,14 @@ sub _get_titled_section {
elsif($state == 1) { # accumulating text until end of head1
if( $token->is_text ) {
- DEBUG and print " Adding \"", $token->text, "\" to head1-content.\n";
- $head1_text_content .= $token->text;
+ unless ($skipX) {
+ DEBUG and print " Adding \"", $token->text, "\" to head1-content.\n";
+ $head1_text_content .= $token->text;
+ }
+ } elsif( $token->is_tagname('X') ) {
+ # We're going to want to ignore X<> stuff.
+ $skipX = $token->is_start;
+ DEBUG and print +($skipX ? 'Start' : 'End'), 'ing ignoring of X<> tag';
} elsif( $token->is_end and $token->tagname eq 'head1' ) {
DEBUG and print " Found end of head1. Considering content...\n";
$head1_text_content = uc $head1_text_content if $nocase;
@@ -392,9 +399,9 @@ sub _get_titled_section {
? (length($head1_text_content) <= $max_content_length) # sanity
: 1)
) {
- DEBUG and print " It looks titular: \"$head1_text_content\".\n",
- "\n Using that.\n";
- $title = $head1_text_content;
+ # Looks good; trim it
+ ($title = $head1_text_content) =~ s/\s+$//;
+ DEBUG and print " It looks titular: \"$title\".\n\n Using that.\n";
last;
} else {
--$state;
@@ -736,7 +743,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm
index aaa5796b50..b4f0207720 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
sub new { # Class->new(tagname);
my $class = shift;
@@ -83,7 +83,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm
index ee4c48491b..ec65787c7b 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
sub new { # Class->new(tagname, optional_attrhash);
my $class = shift;
@@ -124,7 +124,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm
index 872fa25862..c237ac41f7 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
sub new { # Class->new(text);
my $class = shift;
@@ -91,7 +91,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm
index 41251886e6..305ef0235e 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
use strict;
sub new { # Class->new('type', stuff...); ## Overridden in derived classes anyway
@@ -126,7 +126,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm b/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm
index 3663d043d0..eff7fba628 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
use Pod::Simple::PullParser ();
BEGIN {@ISA = ('Pod::Simple::PullParser')}
@@ -662,7 +662,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Search.pm b/cpan/Pod-Simple/lib/Pod/Simple/Search.pm
index 79fb37aac3..216ad9b229 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Search.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/Search.pm
@@ -4,7 +4,7 @@ package Pod::Simple::Search;
use strict;
use vars qw($VERSION $MAX_VERSION_WITHIN $SLEEPY);
-$VERSION = '3.23'; ## Current version of this package
+$VERSION = '3.26'; ## Current version of this package
BEGIN { *DEBUG = sub () {0} unless defined &DEBUG; } # set DEBUG level
use Carp ();
@@ -1011,7 +1011,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm b/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm
index 940c0f340e..025b92210e 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm
@@ -6,7 +6,7 @@ use strict;
use Carp ();
use Pod::Simple ();
use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS);
-$VERSION = '3.23';
+$VERSION = '3.26';
BEGIN {
@ISA = ('Pod::Simple');
*DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG;
@@ -143,7 +143,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod b/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod
index 6be2defcc8..720ba66da1 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod
+++ b/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod
@@ -1011,7 +1011,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Text.pm b/cpan/Pod-Simple/lib/Pod/Simple/Text.pm
index 3e0c022894..7971227f68 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Text.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
@ISA = ('Pod::Simple::Methody');
BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG)
? \&Pod::Simple::DEBUG
@@ -148,7 +148,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm b/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm
index 758b78f16f..ca29d54b3d 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm
@@ -6,7 +6,7 @@ use strict;
use Carp ();
use Pod::Simple ();
use vars qw( @ISA $VERSION );
-$VERSION = '3.23';
+$VERSION = '3.26';
@ISA = ('Pod::Simple');
sub new {
@@ -75,7 +75,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm b/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm
index 3e99202b7f..1428e30b77 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm
@@ -4,7 +4,7 @@ package Pod::Simple::TiedOutFH;
use Symbol ('gensym');
use Carp ();
use vars qw($VERSION );
-$VERSION = '3.23';
+$VERSION = '3.26';
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm b/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm
index fcaf4e62c9..e0faa4c1c3 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm
@@ -2,7 +2,7 @@
require 5;
package Pod::Simple::Transcode;
use vars qw($VERSION );
-$VERSION = '3.23';
+$VERSION = '3.26';
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 32e98399a1..374dfb23d8 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm
@@ -5,7 +5,7 @@ require 5;
package Pod::Simple::TranscodeDumb;
use strict;
use vars qw($VERSION %Supported);
-$VERSION = '3.23';
+$VERSION = '3.26';
# 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 0dec8b5def..f1fc64069b 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm
@@ -9,7 +9,7 @@ use strict;
use Pod::Simple;
require Encode;
use vars qw($VERSION );
-$VERSION = '3.23';
+$VERSION = '3.26';
sub is_dumb {0}
sub is_smart {1}
@@ -27,12 +27,12 @@ sub encmodver {
}
sub make_transcoder {
- my($e) = $_[1];
+ my $e = Encode::find_encoding($_[1]);
die "WHAT ENCODING!?!?" unless $e;
my $x;
return sub {
foreach $x (@_) {
- $x = Encode::decode($e, $x) unless Encode::is_utf8($x);
+ $x = $e->decode($x) unless Encode::is_utf8($x);
}
return;
};
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm b/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm
index 5fd0967f8e..b38a408d00 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
use Pod::Simple::Methody ();
@ISA = ('Pod::Simple::Methody');
@@ -342,15 +342,19 @@ sub accept_targets_as_html {
}
sub handle_text {
- if ($_[0]{'in_code'} && @{$_[0]{'in_code'}}) {
- return $_[0]->handle_code( $_[1], $_[0]{'in_code'}[-1] );
- }
# escape special characters in HTML (<, >, &, etc)
my $text = $_[0]->__in_literal_xhtml_region
? $_[1]
: $_[0]->encode_entities( $_[1] );
- $_[0]{'scratch'} .= $text;
+ if ($_[0]{'in_code'} && @{$_[0]{'in_code'}}) {
+ # Intentionally use the raw text in $_[1], even if we're not in a
+ # literal xhtml region, since handle_code calls encode_entities.
+ $_[0]->handle_code( $_[1], $_[0]{'in_code'}[-1] );
+ } else {
+ $_[0]{'scratch'} .= $text;
+ }
+
$_[0]{htext} .= $text if $_[0]{'in_head'};
}
@@ -733,6 +737,11 @@ underscores (_), colons (:), and periods (.).
=item *
+The final character can't be a hyphen, colon, or period. URLs ending with these
+characters, while allowed by XHTML, can be awkward to extract from plain text.
+
+=item *
+
Each id must be unique within the document.
=back
@@ -754,6 +763,7 @@ sub idify {
s/^([^a-zA-Z]+)$/pod$1/; # Prepend "pod" if no valid chars.
s/^[^a-zA-Z]+//; # First char must be a letter.
s/[^-a-zA-Z0-9_:.]+/-/g; # All other chars must be valid.
+ s/[-:.]+$//; # Strip trailing punctuation.
}
return $t if $not_unique;
my $i = '';
@@ -798,7 +808,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm b/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm
index 1cbc3368cb..7dc604e717 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm
+++ b/cpan/Pod-Simple/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.23';
+$VERSION = '3.26';
BEGIN {
@ISA = ('Pod::Simple');
*DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG;
@@ -148,7 +148,7 @@ pod-people@perl.org mail list. Send an empty email to
pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository,
-L<http://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
+L<https://github.com/theory/pod-simple/>. Feel free to fork and contribute, or
to clone L<git://github.com/theory/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to
diff --git a/cpan/Pod-Simple/t/closeys.t b/cpan/Pod-Simple/t/closeys.t
index 683ce13ff3..7e2b3f85e9 100644
--- a/cpan/Pod-Simple/t/closeys.t
+++ b/cpan/Pod-Simple/t/closeys.t
@@ -25,6 +25,7 @@ sub nowhine {
$_[0]->accept_targets("*");
}
+local $Pod::Simple::XMLOutStream::SORT_ATTRS = 1;
&ok(e(
"=begin :foo\n\n=begin :bar\n\nZaz\n\n",
"=begin :foo\n\n=begin :bar\n\nZaz\n\n=end :bar\n\n=end :foo\n\n",
diff --git a/cpan/Pod-Simple/t/corpus/2202jp.xml b/cpan/Pod-Simple/t/corpus/2202jp.xml
index ea662aabf3..b020db0c5d 100644
--- a/cpan/Pod-Simple/t/corpus/2202jp.xml
+++ b/cpan/Pod-Simple/t/corpus/2202jp.xml
@@ -8,6 +8,9 @@
<head1 start_line="7">
DESCRIPTION
</head1>
+ <encoding start_line="9">
+ iso-2022-jp
+ </encoding>
<Para start_line="11">
This is a test Pod document in ISO-2202-JP. Its content is some Japanese
haiku by famous poets.
diff --git a/cpan/Pod-Simple/t/corpus/2202jpx.xml b/cpan/Pod-Simple/t/corpus/2202jpx.xml
index fde111d542..69e45f0f64 100644
--- a/cpan/Pod-Simple/t/corpus/2202jpx.xml
+++ b/cpan/Pod-Simple/t/corpus/2202jpx.xml
@@ -8,6 +8,9 @@
<head1 start_line="7">
DESCRIPTION
</head1>
+ <encoding start_line="9">
+ iso-2022-jp
+ </encoding>
<Para start_line="11">
This is a test Pod document in ISO-2202-JP. Its content is some Japanese
haiku by famous poets.
diff --git a/cpan/Pod-Simple/t/corpus/2202jpy.xml b/cpan/Pod-Simple/t/corpus/2202jpy.xml
index cc336af786..a8e322dbd5 100644
--- a/cpan/Pod-Simple/t/corpus/2202jpy.xml
+++ b/cpan/Pod-Simple/t/corpus/2202jpy.xml
@@ -8,6 +8,9 @@
<head1 start_line="6">
DESCRIPTION
</head1>
+ <encoding start_line="8">
+ iso-2022-jp
+ </encoding>
<Para start_line="10">
This is a test Pod document in ISO-2202-JP. Its content is some Japanese
haiku by famous poets.
diff --git a/cpan/Pod-Simple/t/corpus/2202jpz.xml b/cpan/Pod-Simple/t/corpus/2202jpz.xml
index 734ed6f5d8..8fe1bb00df 100644
--- a/cpan/Pod-Simple/t/corpus/2202jpz.xml
+++ b/cpan/Pod-Simple/t/corpus/2202jpz.xml
@@ -8,6 +8,9 @@
<head1 start_line="6">
DESCRIPTION
</head1>
+ <encoding start_line="8">
+ iso-2022-jp
+ </encoding>
<Para start_line="10">
This is a test Pod document in ISO-2202-JP.
</Para>
diff --git a/cpan/Pod-Simple/t/corpus/8859_7.xml b/cpan/Pod-Simple/t/corpus/8859_7.xml
index 436ac9c042..3760803bcf 100644
--- a/cpan/Pod-Simple/t/corpus/8859_7.xml
+++ b/cpan/Pod-Simple/t/corpus/8859_7.xml
@@ -1,4 +1,7 @@
<Document start_line="2">
+ <encoding start_line="2">
+ iso-8859-7
+ </encoding>
<head1 start_line="4">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/cp1256.xml b/cpan/Pod-Simple/t/corpus/cp1256.xml
index 18abda4d41..b096011438 100644
--- a/cpan/Pod-Simple/t/corpus/cp1256.xml
+++ b/cpan/Pod-Simple/t/corpus/cp1256.xml
@@ -12,6 +12,9 @@
This Pod document is a paragraph in Arabic from &#34;The Five Pillars of
Islam&#34; as CP-1256.
</Para>
+ <encoding start_line="11">
+ cp1256
+ </encoding>
<Para start_line="13">
&#1608;&#1593;&#1606; &#1593;&#1605;&#1575;&#1585;&#1577; &#1576;&#1606;
&#1581;&#1586;&#1605; &#1602;&#1575;&#1604; &#1602;&#1575;&#1604;
diff --git a/cpan/Pod-Simple/t/corpus/encwarn03.txt b/cpan/Pod-Simple/t/corpus/encwarn03.txt
new file mode 100644
index 0000000000..e3e8b94734
--- /dev/null
+++ b/cpan/Pod-Simple/t/corpus/encwarn03.txt
@@ -0,0 +1,12 @@
+package MyPackage;
+
+use strict;
+
+# Comment here contains āccénted characters but should not generate any
+# parse warning since they do not occur in a POD section
+
+sub main {
+ print "This file contains no POD\n";
+}
+
+1;
diff --git a/cpan/Pod-Simple/t/corpus/encwarn03.xml b/cpan/Pod-Simple/t/corpus/encwarn03.xml
new file mode 100644
index 0000000000..7b4e3ed547
--- /dev/null
+++ b/cpan/Pod-Simple/t/corpus/encwarn03.xml
@@ -0,0 +1,2 @@
+<Document contentless="1" start_line="12">
+</Document>
diff --git a/cpan/Pod-Simple/t/corpus/encwarn04.txt b/cpan/Pod-Simple/t/corpus/encwarn04.txt
new file mode 100644
index 0000000000..8b0ff5dc30
--- /dev/null
+++ b/cpan/Pod-Simple/t/corpus/encwarn04.txt
@@ -0,0 +1,17 @@
+package MyPackage;
+
+use strict;
+
+# Checking encoding warning is generated even on first line of POD
+
+sub main {
+ print "This file contains no POD\n";
+}
+
+1;
+
+=head1 TŨTORIAL
+
+The encoding warning should only fire when the parser is 'in_pod' but that
+should also be true on the first line of POD (above).
+
diff --git a/cpan/Pod-Simple/t/corpus/encwarn04.xml b/cpan/Pod-Simple/t/corpus/encwarn04.xml
new file mode 100644
index 0000000000..9e849c1b8a
--- /dev/null
+++ b/cpan/Pod-Simple/t/corpus/encwarn04.xml
@@ -0,0 +1,27 @@
+<Document start_line="13">
+ <head1 start_line="13">
+ T&#360;TORIAL
+ </head1>
+ <Para start_line="15">
+ The encoding warning should only fire when the parser is &#39;in_pod&#39;
+ but that should also be true on the first line of POD (above).
+ </Para>
+ <head1 errata="1" start_line="-321">
+ POD ERRORS
+ </head1>
+ <Para errata="1" start_line="-321">
+ Hey!
+ <B>
+ The above document had some coding errors, which are explained below:
+ </B>
+ </Para>
+ <over-text errata="1" indent="4" start_line="-321">
+ <item-text start_line="-321">
+ Around line 13:
+ </item-text>
+ <Para start_line="-321">
+ Non-ASCII character seen before =encoding in &#39;T&#360;TORIAL&#39;.
+ Assuming UTF-8
+ </Para>
+ </over-text>
+</Document>
diff --git a/cpan/Pod-Simple/t/corpus/fet_cont.xml b/cpan/Pod-Simple/t/corpus/fet_cont.xml
index 045de1b97e..a584269653 100644
--- a/cpan/Pod-Simple/t/corpus/fet_cont.xml
+++ b/cpan/Pod-Simple/t/corpus/fet_cont.xml
@@ -1,4 +1,7 @@
<Document start_line="5">
+ <encoding start_line="5">
+ koi8-r
+ </encoding>
<head1 start_line="7">
NAME
</head1>
@@ -12,6 +15,9 @@
<head1 start_line="11">
TEXT
</head1>
+ <encoding start_line="13">
+ Shift-JIS
+ </encoding>
<Para start_line="15">
(This is a test Pod pocument in KOI8-R.)
</Para>
diff --git a/cpan/Pod-Simple/t/corpus/fet_dup.xml b/cpan/Pod-Simple/t/corpus/fet_dup.xml
index 3259f4e092..11e8a9af18 100644
--- a/cpan/Pod-Simple/t/corpus/fet_dup.xml
+++ b/cpan/Pod-Simple/t/corpus/fet_dup.xml
@@ -1,4 +1,7 @@
<Document start_line="5">
+ <encoding start_line="5">
+ koi8-r
+ </encoding>
<head1 start_line="7">
NAME
</head1>
@@ -103,6 +106,9 @@
&#1042;&#1089;&#1090;&#1072;&#1074;&#1072;&#1083;&#1072;
&#1074;&#1076;&#1088;&#1091;&#1075;&#1079;&#1072;&#1088;&#1103;.
</VerbatimFormatted>
+ <encoding start_line="44">
+ koi8-r
+ </encoding>
<VerbatimFormatted start_line="46" xml:space="preserve">
&#1048; &#1074; &#1101;&#1090;&#1091;
&#1082;&#1088;&#1072;&#1089;&#1086;&#1090;&#1091;
diff --git a/cpan/Pod-Simple/t/corpus/iso6.xml b/cpan/Pod-Simple/t/corpus/iso6.xml
index dae9fadfc9..0619c06764 100644
--- a/cpan/Pod-Simple/t/corpus/iso6.xml
+++ b/cpan/Pod-Simple/t/corpus/iso6.xml
@@ -12,6 +12,9 @@
This document is a paragraph in Arabic from &#34;The Five Pillars of
Islam&#34; as ISO-8859-6.
</Para>
+ <encoding start_line="11">
+ iso-8859-6
+ </encoding>
<Para start_line="13">
&#1608;&#1593;&#1606; &#1593;&#1605;&#1575;&#1585;&#1577; &#1576;&#1606;
&#1581;&#1586;&#1605; &#1602;&#1575;&#1604; &#1602;&#1575;&#1604;
diff --git a/cpan/Pod-Simple/t/corpus/koi8r.xml b/cpan/Pod-Simple/t/corpus/koi8r.xml
index 2c851d41a8..4fe0b5c823 100644
--- a/cpan/Pod-Simple/t/corpus/koi8r.xml
+++ b/cpan/Pod-Simple/t/corpus/koi8r.xml
@@ -1,4 +1,7 @@
<Document start_line="2">
+ <encoding start_line="2">
+ koi8-r
+ </encoding>
<head1 start_line="4">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/laozi38.xml b/cpan/Pod-Simple/t/corpus/laozi38.xml
index e8c3e6597f..a3b1748ef0 100644
--- a/cpan/Pod-Simple/t/corpus/laozi38.xml
+++ b/cpan/Pod-Simple/t/corpus/laozi38.xml
@@ -1,4 +1,7 @@
<Document start_line="1">
+ <encoding start_line="1">
+ big5
+ </encoding>
<head1 start_line="3">
&#32769;&#23376;&#36947;&#24503;&#32147; &#19977;&#21313;&#20843;&#31456;
-- Big5 (Chinese) encoding test
diff --git a/cpan/Pod-Simple/t/corpus/laozi38b.xml b/cpan/Pod-Simple/t/corpus/laozi38b.xml
index e8c3e6597f..92db1bb17e 100644
--- a/cpan/Pod-Simple/t/corpus/laozi38b.xml
+++ b/cpan/Pod-Simple/t/corpus/laozi38b.xml
@@ -1,4 +1,7 @@
<Document start_line="1">
+ <encoding start_line="1">
+ big5-eten
+ </encoding>
<head1 start_line="3">
&#32769;&#23376;&#36947;&#24503;&#32147; &#19977;&#21313;&#20843;&#31456;
-- Big5 (Chinese) encoding test
diff --git a/cpan/Pod-Simple/t/corpus/laozi38p.xml b/cpan/Pod-Simple/t/corpus/laozi38p.xml
index e504af3628..e1694d46e1 100644
--- a/cpan/Pod-Simple/t/corpus/laozi38p.xml
+++ b/cpan/Pod-Simple/t/corpus/laozi38p.xml
@@ -1,4 +1,7 @@
<Document start_line="2">
+ <encoding start_line="2">
+ big5
+ </encoding>
<head1 start_line="4">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/lat1fr.xml b/cpan/Pod-Simple/t/corpus/lat1fr.xml
index e258844a67..d16d3a306f 100644
--- a/cpan/Pod-Simple/t/corpus/lat1fr.xml
+++ b/cpan/Pod-Simple/t/corpus/lat1fr.xml
@@ -1,4 +1,7 @@
<Document start_line="2">
+ <encoding start_line="2">
+ iso-8859-1
+ </encoding>
<head1 start_line="4">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/pasternak_cp1251.xml b/cpan/Pod-Simple/t/corpus/pasternak_cp1251.xml
index c1f59011ba..ddc76c3f06 100644
--- a/cpan/Pod-Simple/t/corpus/pasternak_cp1251.xml
+++ b/cpan/Pod-Simple/t/corpus/pasternak_cp1251.xml
@@ -1,4 +1,7 @@
<Document start_line="2">
+ <encoding start_line="2">
+ cp1251
+ </encoding>
<head1 start_line="4">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/plain_explicit.xml b/cpan/Pod-Simple/t/corpus/plain_explicit.xml
index 3fafb99bf5..c126fdda9c 100644
--- a/cpan/Pod-Simple/t/corpus/plain_explicit.xml
+++ b/cpan/Pod-Simple/t/corpus/plain_explicit.xml
@@ -1,4 +1,7 @@
<Document start_line="2">
+ <encoding start_line="2">
+ ascii
+ </encoding>
<head1 start_line="4">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/plain_latin1.xml b/cpan/Pod-Simple/t/corpus/plain_latin1.xml
index c55f67feff..fc15763653 100644
--- a/cpan/Pod-Simple/t/corpus/plain_latin1.xml
+++ b/cpan/Pod-Simple/t/corpus/plain_latin1.xml
@@ -1,4 +1,7 @@
<Document start_line="4">
+ <encoding start_line="4">
+ iso-8859-1
+ </encoding>
<head1 start_line="6">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/plain_utf8.xml b/cpan/Pod-Simple/t/corpus/plain_utf8.xml
index d6939a488a..71da6be0e1 100644
--- a/cpan/Pod-Simple/t/corpus/plain_utf8.xml
+++ b/cpan/Pod-Simple/t/corpus/plain_utf8.xml
@@ -1,4 +1,7 @@
<Document start_line="4">
+ <encoding start_line="4">
+ utf8
+ </encoding>
<head1 start_line="6">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/polish_utf8.xml b/cpan/Pod-Simple/t/corpus/polish_utf8.xml
index d8e91d8656..2778571c95 100644
--- a/cpan/Pod-Simple/t/corpus/polish_utf8.xml
+++ b/cpan/Pod-Simple/t/corpus/polish_utf8.xml
@@ -1,4 +1,7 @@
<Document start_line="2">
+ <encoding start_line="2">
+ utf8
+ </encoding>
<head1 start_line="4">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/s2763_sjis.xml b/cpan/Pod-Simple/t/corpus/s2763_sjis.xml
index f6f704283b..fd1ac19082 100644
--- a/cpan/Pod-Simple/t/corpus/s2763_sjis.xml
+++ b/cpan/Pod-Simple/t/corpus/s2763_sjis.xml
@@ -1,4 +1,7 @@
<Document start_line="2">
+ <encoding start_line="2">
+ shiftjis
+ </encoding>
<head1 start_line="4">
NAME
</head1>
diff --git a/cpan/Pod-Simple/t/corpus/thai_iso11.xml b/cpan/Pod-Simple/t/corpus/thai_iso11.xml
index 79fcff08b6..8d0f8dbc7e 100644
--- a/cpan/Pod-Simple/t/corpus/thai_iso11.xml
+++ b/cpan/Pod-Simple/t/corpus/thai_iso11.xml
@@ -8,6 +8,9 @@
<head1 start_line="6">
DESCRIPTION
</head1>
+ <encoding start_line="8">
+ iso-8859-11
+ </encoding>
<Para start_line="10">
This is a test Pod document in ISO-8859-11. Its content is a poem to (by?)
Khun Thong Dang
diff --git a/cpan/Pod-Simple/t/enc-chars.t b/cpan/Pod-Simple/t/enc-chars.t
new file mode 100644
index 0000000000..65b4259df2
--- /dev/null
+++ b/cpan/Pod-Simple/t/enc-chars.t
@@ -0,0 +1,61 @@
+# tell parser the source POD has already been decoded from bytes to chars
+# =encoding line should be ignored
+# utf8 characters should come through unscathed
+
+BEGIN {
+ if($ENV{PERL_CORE}) {
+ chdir 't';
+ @INC = '../lib';
+ }
+
+ use Config;
+ if ($Config::Config{'extensions'} !~ /\bEncode\b/) {
+ print "1..0 # Skip: Encode was not built\n";
+ exit 0;
+ }
+}
+
+use strict;
+use Test;
+BEGIN { plan tests => 3 };
+
+use Pod::Simple::DumpAsXML;
+use Pod::Simple::XMLOutStream;
+
+
+my $parser = Pod::Simple::XMLOutStream->new;
+$parser->parse_characters(1);
+my $output = '';
+$parser->output_string( \$output );
+$parser->parse_string_document(qq{
+
+=encoding bogocode
+
+=head1 DESCRIPTION
+
+Confirm that if we tell the parser to expect character data, it avoids all
+the code paths that might attempt to decode the source from bytes to chars.
+
+The r\x{101}in in \x{15E}pain \x{FB02}oods the plain
+
+});
+
+ok(1); # parsed without exception
+
+if($output =~ /POD ERRORS/) {
+ ok(0);
+}
+else {
+ ok(1); # no errors
+}
+
+$output =~ s{&#(\d+);}{chr($1)}eg;
+
+if($output =~ /The r\x{101}in in \x{15E}pain \x{FB02}oods the plain/) {
+ ok(1); # data was not messed up
+}
+else {
+ ok(0);
+}
+
+exit;
diff --git a/cpan/Pod-Simple/t/encod04.t b/cpan/Pod-Simple/t/encod04.t
new file mode 100644
index 0000000000..fe2c314c39
--- /dev/null
+++ b/cpan/Pod-Simple/t/encod04.t
@@ -0,0 +1,143 @@
+# The encoding detection heuristic will choose UTF8 or Latin-1. The current
+# implementation will usually treat CP1252 (aka "Win-Latin-1") as Latin-1 but
+# can be fooled into seeing it as UTF8.
+#
+# Note 1: Neither guess is 'correct' since even if we choose Latin-1, all the
+# smart quote symbols will be rendered as control characters
+#
+# Note 2: the guess is only applied if the source POD omits =encoding, so
+# CP1252 source will render correctly if properly declared
+#
+
+BEGIN {
+ if($ENV{PERL_CORE}) {
+ chdir 't';
+ @INC = '../lib';
+ }
+}
+
+use strict;
+use Test;
+BEGIN { plan tests => 5 };
+
+ok 1;
+
+use Pod::Simple::DumpAsXML;
+use Pod::Simple::XMLOutStream;
+
+
+# Initial, isolated, non-ASCII byte triggers Latin-1 guess and later
+# multi-byte sequence is not considered by heuristic.
+
+my @output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( qq{
+
+=head1 NAME
+
+Em::Dash \x97 \x91CAF\xC9\x92
+
+=cut
+
+} );
+
+my($guess) = "@output_lines" =~ m{Non-ASCII.*?Assuming ([\w-]+)};
+if( $guess ) {
+ if( $guess eq 'ISO8859-1' ) {
+ if( grep m{Dash (\x97|&#x97;|&#151;)}, @output_lines ) {
+ ok 1;
+ } else {
+ ok 0;
+ print "# failed to find expected control character in output\n"
+ }
+ } else {
+ ok 0;
+ print "# parser guessed wrong encoding expected 'ISO8859-1' got '$guess'\n";
+ }
+} else {
+ ok 0;
+ print "# parser failed to detect non-ASCII bytes in input\n";
+}
+
+
+# Initial smart-quote character triggers Latin-1 guess as expected
+
+@output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( qq{
+
+=head1 NAME
+
+Smart::Quote - \x91FUT\xC9\x92
+
+=cut
+
+} );
+
+($guess) = "@output_lines" =~ m{Non-ASCII.*?Assuming ([\w-]+)};
+if( $guess ) {
+ if( $guess eq 'ISO8859-1' ) {
+ ok 1;
+ } else {
+ ok 0;
+ print "# parser guessed wrong encoding expected 'ISO8859-1' got '$guess'\n";
+ }
+} else {
+ ok 0;
+ print "# parser failed to detect non-ASCII bytes in input\n";
+}
+
+
+# Initial accented character followed by 'smart' apostrophe causes heuristic
+# to choose UTF8 (a rather contrived example)
+
+@output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( qq{
+
+=head1 NAME
+
+Smart::Apostrophe::Fail - L\xC9\x92STRANGE
+
+=cut
+
+} );
+
+($guess) = "@output_lines" =~ m{Non-ASCII.*?Assuming ([\w-]+)};
+if( $guess ) {
+ if( $guess eq 'UTF-8' ) {
+ ok 1;
+ } else {
+ ok 0;
+ print "# parser guessed wrong encoding expected 'UTF-8' got '$guess'\n";
+ }
+} else {
+ ok 0;
+ print "# parser failed to detect non-ASCII bytes in input\n";
+}
+
+
+# The previous example used a CP1252 byte sequence that also happened to be a
+# valid UTF8 byte sequence. In this example the heuristic also guesses 'wrong'
+# despite the byte sequence not being valid UTF8 (it's too short). This could
+# arguably be 'fixed' by using a less naive regex.
+
+@output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( qq{
+
+=head1 NAME
+
+Smart::Apostrophe::Fail - L\xE9\x92Strange
+
+=cut
+
+} );
+
+($guess) = "@output_lines" =~ m{Non-ASCII.*?Assuming ([\w-]+)};
+if( $guess ) {
+ if( $guess eq 'UTF-8' ) {
+ ok 1;
+ } else {
+ ok 0;
+ print "# parser guessed wrong encoding expected 'UTF-8' got '$guess'\n";
+ }
+} else {
+ ok 0;
+ print "# parser failed to detect non-ASCII bytes in input\n";
+}
+
+
+exit;
diff --git a/cpan/Pod-Simple/t/fcodes_l.t b/cpan/Pod-Simple/t/fcodes_l.t
index 62970201d5..3433d24425 100644
--- a/cpan/Pod-Simple/t/fcodes_l.t
+++ b/cpan/Pod-Simple/t/fcodes_l.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use Test;
-BEGIN { plan tests => 99 };
+BEGIN { plan tests => 101 };
#use Pod::Simple::Debug (10);
@@ -35,6 +35,14 @@ ok($x->_out(qq{=pod\n\nL<crontab(5)>\n}),
'<Document><Para><L content-implicit="yes" raw="crontab(5)" to="crontab(5)" type="man">crontab(5)</L></Para></Document>'
);
+ok($x->_out(qq{=pod\n\nL<login.conf(5)>\n}),
+ '<Document><Para><L content-implicit="yes" raw="login.conf(5)" to="login.conf(5)" type="man">login.conf(5)</L></Para></Document>'
+);
+
+ok($x->_out(qq{=pod\n\nL<foo_bar(5)>\n}),
+ '<Document><Para><L content-implicit="yes" raw="foo_bar(5)" to="foo_bar(5)" type="man">foo_bar(5)</L></Para></Document>'
+);
+
ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-pong>\n}),
'<Document><Para><L content-implicit="yes" raw="Net::Ping/Ping-pong" section="Ping-pong" to="Net::Ping" type="pod">&#34;Ping-pong&#34; in Net::Ping</L></Para></Document>'
);
diff --git a/cpan/Pod-Simple/t/items.t b/cpan/Pod-Simple/t/items.t
index dcb695f3dd..630ef87f8d 100644
--- a/cpan/Pod-Simple/t/items.t
+++ b/cpan/Pod-Simple/t/items.t
@@ -91,7 +91,9 @@ ok( $x->_out("\n=over\n\n=item Foo\n\n Stuff\n\tSnork\n=cut\n\nCrunk\nZorp\n\n=i
print "#\n# Test for mixed =item blocks...\n";
-ok( $x->_out("\n=over\n\n=item Foo\n\nStuff\n\n=item 2.\n\nBar I<baz>!\n\nQuux\n\n=item *\n\nThwoong\n\n=back\n\n"),
+ok( $x->_out(
+ sub { $_[0]->no_errata_section(1) }, # We know this will complain
+ "\n=over\n\n=item Foo\n\nStuff\n\n=item 2.\n\nBar I<baz>!\n\nQuux\n\n=item *\n\nThwoong\n\n=back\n\n"),
qq{<Document><over-text indent="4"><item-text>Foo</item-text><Para>Stuff</Para>}
. qq{<item-text>2.</item-text><Para>Bar <I>baz</I>!</Para><Para>Quux</Para>}
. qq{<item-text>*</item-text><Para>Thwoong</Para></over-text></Document>}
diff --git a/cpan/Pod-Simple/t/items02.t b/cpan/Pod-Simple/t/items02.t
index d604baab5a..daab8efe6c 100644
--- a/cpan/Pod-Simple/t/items02.t
+++ b/cpan/Pod-Simple/t/items02.t
@@ -1,44 +1,46 @@
-# Testing the =item directive
-BEGIN {
- if($ENV{PERL_CORE}) {
- chdir 't';
- @INC = '../lib';
- }
-}
-
-use strict;
-use Test;
-BEGIN { plan tests => 4 };
-
-my $d;
-#use Pod::Simple::Debug (\$d,0);
-
-ok 1;
-
-use Pod::Simple::DumpAsXML;
-use Pod::Simple::XMLOutStream;
-print "# Pod::Simple version $Pod::Simple::VERSION\n";
-sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
-
-my $x = 'Pod::Simple::XMLOutStream';
-
-print "##### Tests for =item directives via class $x\n";
-
-$Pod::Simple::XMLOutStream::ATTR_PAD = ' ';
-$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output
-
-
-print "#\n# Tests for =item [number] that are icky...\n";
-ok( $x->_out("\n=over\n\n=item 5\n\nStuff\n\n=cut\n\nCrunk\nZorp\n\n=item 4\n\nQuux\n\n=back\n\n"),
- '<Document><over-text indent="4"><item-text>5</item-text><Para>Stuff</Para><item-text>4</item-text><Para>Quux</Para></over-text></Document>'
-);
-
-ok( $x->_out("\n=over\n\n=item 5.\n\nStuff\n\n=cut\n\nCrunk\nZorp\n\n=item 4.\n\nQuux\n\n=back\n\n"),
- '<Document><over-text indent="4"><item-text>5.</item-text><Para>Stuff</Para><item-text>4.</item-text><Para>Quux</Para></over-text></Document>'
-);
-
-
-print "# Wrapping up... one for the road...\n";
-ok 1;
-print "# --- Done with ", __FILE__, " --- \n";
-
+# Testing the =item directive
+BEGIN {
+ if($ENV{PERL_CORE}) {
+ chdir 't';
+ @INC = '../lib';
+ }
+}
+
+use strict;
+use Test;
+BEGIN { plan tests => 4 };
+
+my $d;
+#use Pod::Simple::Debug (\$d,0);
+
+ok 1;
+
+use Pod::Simple::DumpAsXML;
+use Pod::Simple::XMLOutStream;
+print "# Pod::Simple version $Pod::Simple::VERSION\n";
+sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
+
+my $x = 'Pod::Simple::XMLOutStream';
+
+print "##### Tests for =item directives via class $x\n";
+
+$Pod::Simple::XMLOutStream::ATTR_PAD = ' ';
+$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output
+
+
+print "#\n# Tests for =item [number] that are icky...\n";
+ok( $x->_out(sub { $_[0]->no_errata_section(1) },
+ "\n=over\n\n=item 5\n\nStuff\n\n=cut\n\nCrunk\nZorp\n\n=item 4\n\nQuux\n\n=back\n\n"),
+ '<Document><over-text indent="4"><item-text>5</item-text><Para>Stuff</Para><item-text>4</item-text><Para>Quux</Para></over-text></Document>'
+);
+
+ok( $x->_out(sub { $_[0]->no_errata_section(1) },
+ "\n=over\n\n=item 5.\n\nStuff\n\n=cut\n\nCrunk\nZorp\n\n=item 4.\n\nQuux\n\n=back\n\n"),
+ '<Document><over-text indent="4"><item-text>5.</item-text><Para>Stuff</Para><item-text>4.</item-text><Para>Quux</Para></over-text></Document>'
+);
+
+
+print "# Wrapping up... one for the road...\n";
+ok 1;
+print "# --- Done with ", __FILE__, " --- \n";
+
diff --git a/cpan/Pod-Simple/t/pulltitl.t b/cpan/Pod-Simple/t/pulltitl.t
index 22934f530e..6fbb6244ab 100644
--- a/cpan/Pod-Simple/t/pulltitl.t
+++ b/cpan/Pod-Simple/t/pulltitl.t
@@ -7,7 +7,7 @@ BEGIN {
use strict;
use Test;
-BEGIN { plan tests => 116 };
+BEGIN { plan tests => 117 };
#use Pod::Simple::Debug (5);
@@ -408,6 +408,14 @@ ok( $t && $t->type eq 'start' && $t->tagname, 'Document' );
}
###########################################################################
+{
+print "# Testing a title with an X<>, at line ", __LINE__, "\n";
+my $p = Pod::Simple::PullParser->new;
+$p->set_source( \qq{\n=head1 NAME Foo Bar\nX<Some entry>\n} );
+
+ok $p->get_title(), 'NAME Foo Bar';
+}
+
###########################################################################
diff --git a/cpan/Pod-Simple/t/xhtml-bkb.t b/cpan/Pod-Simple/t/xhtml-bkb.t
new file mode 100644
index 0000000000..c49cef46c0
--- /dev/null
+++ b/cpan/Pod-Simple/t/xhtml-bkb.t
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+
+# t/xhtml-bkb.t - https://rt.cpan.org/Public/Bug/Display.html?id=77686
+
+use strict;
+use warnings;
+use Test::More tests => 1;
+use Pod::Simple::XHTML;
+my $c = <<EOF;
+=head1 Documentation
+
+=head2 Changes to Existing Documentation
+
+=head3 L<perldata>
+EOF
+my $d = Pod::Simple::XHTML->new ();
+$d->index (1);
+my $e;
+$d->output_string (\$e);
+$d->parse_string_document ($c);
+unlike ($e, qr!<a[^>]+><a[^>]+>!);
diff --git a/cpan/Pod-Simple/t/xhtml01.t b/cpan/Pod-Simple/t/xhtml01.t
index 16fc8a101c..b31260b6bd 100644
--- a/cpan/Pod-Simple/t/xhtml01.t
+++ b/cpan/Pod-Simple/t/xhtml01.t
@@ -23,7 +23,7 @@ my $MANURL = "http://man.he.net/man";
initialize($parser, $results);
$parser->parse_string_document( "=head1 Poit!" );
-is($results, qq{<h1 id="Poit-">Poit!</h1>\n\n}, "head1 level output");
+is($results, qq{<h1 id="Poit">Poit!</h1>\n\n}, "head1 level output");
initialize($parser, $results);
$parser->parse_string_document( "=head2 Yada Yada Operator
@@ -31,21 +31,25 @@ X<...> X<... operator> X<yada yada operator>" );
is($results, qq{<h2 id="Yada-Yada-Operator">Yada Yada Operator </h2>\n\n}, "head ID with X<>");
initialize($parser, $results);
+$parser->parse_string_document( "=head2 Platforms with no supporting programmers:");
+is($results, qq{<h2 id="Platforms-with-no-supporting-programmers">Platforms with no supporting programmers:</h2>\n\n}, "head ID ending in colon");
+
+initialize($parser, $results);
$parser->html_h_level(2);
$parser->parse_string_document( "=head1 Poit!" );
-is($results, qq{<h2 id="Poit-">Poit!</h2>\n\n}, "head1 level output h_level 2");
+is($results, qq{<h2 id="Poit">Poit!</h2>\n\n}, "head1 level output h_level 2");
initialize($parser, $results);
$parser->parse_string_document( "=head2 I think so Brain." );
-is($results, qq{<h2 id="I-think-so-Brain.">I think so Brain.</h2>\n\n}, "head2 level output");
+is($results, qq{<h2 id="I-think-so-Brain">I think so Brain.</h2>\n\n}, "head2 level output");
initialize($parser, $results);
$parser->parse_string_document( "=head3 I say, Brain..." );
-is($results, qq{<h3 id="I-say-Brain...">I say, Brain...</h3>\n\n}, "head3 level output");
+is($results, qq{<h3 id="I-say-Brain">I say, Brain...</h3>\n\n}, "head3 level output");
initialize($parser, $results);
$parser->parse_string_document( "=head4 Zort & Zog!" );
-is($results, qq{<h4 id="Zort-Zog-">Zort &amp; Zog!</h4>\n\n}, "head4 level output");
+is($results, qq{<h4 id="Zort-Zog">Zort &amp; Zog!</h4>\n\n}, "head4 level output");
sub x ($;&) {
my $code = $_[1];
diff --git a/cpan/Pod-Simple/t/xhtml10.t b/cpan/Pod-Simple/t/xhtml10.t
index 5b20a5f668..353a50f6cb 100644
--- a/cpan/Pod-Simple/t/xhtml10.t
+++ b/cpan/Pod-Simple/t/xhtml10.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use lib '../lib';
-use Test::More tests => 58;
+use Test::More tests => 60;
#use Test::More 'no_plan';
use_ok('Pod::Simple::XHTML') or exit;
@@ -23,7 +23,7 @@ for my $spec (
[ 'fo$bar' => 'fo-bar', 'fo-bar' ],
[ 'f12' => 'f12', 'f12' ],
[ '13' => 'pod13', 'pod13' ],
- [ '**.:' => 'pod-.:', 'pod-.:' ],
+ [ '**.:' => 'pod', 'pod' ],
) {
is $parser->idify( $spec->[0] ), $spec->[1],
qq{ID for "$spec->[0]" should be "$spec->[1]"};
@@ -97,6 +97,22 @@ is $results, <<'EOF', 'Should have both and the index';
<h1 id="Bar">Bar</h1>
EOF
+
+initialize($parser, $results);
+ok $parser->parse_string_document( "=head1 Foo C<Bar>\n\n=head1 C<Baz>" ),
+ 'Parse two headers with C<> formatting';
+is $results, <<'EOF', 'Should have the index';
+<ul id="index">
+ <li><a href="#Foo-Bar">Foo Bar</a></li>
+ <li><a href="#Baz">Baz</a></li>
+</ul>
+
+<h1 id="Foo-Bar">Foo <code>Bar</code></h1>
+
+<h1 id="Baz"><code>Baz</code></h1>
+
+EOF
+
initialize($parser, $results);
ok $parser->parse_string_document( "=head1 Foo\n\n=head1 Bar\n\n=head1 Baz" ),
'Parse three headers';
diff --git a/cpan/Pod-Simple/t/xhtml20.t b/cpan/Pod-Simple/t/xhtml20.t
index 624b8a0193..c9295c1625 100644
--- a/cpan/Pod-Simple/t/xhtml20.t
+++ b/cpan/Pod-Simple/t/xhtml20.t
@@ -12,7 +12,7 @@ BEGIN {
sub handle_code {
my($self, $code, $kind) = @_;
- $code = "${kind}[$code]";
+ $code = $kind . "[$code]";
$self->SUPER::handle_code($code);
}