summaryrefslogtreecommitdiff
path: root/cpan/Pod-Simple
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/Pod-Simple')
-rw-r--r--cpan/Pod-Simple/ChangeLog30
-rw-r--r--cpan/Pod-Simple/README2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Checker.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Debug.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/HTML.pm171
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm6
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm4
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Methody.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Progress.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/RTF.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Search.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/Text.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm2
-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.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm19
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm2
-rw-r--r--cpan/Pod-Simple/t/html01.t9
-rw-r--r--cpan/Pod-Simple/t/search50.t6
-rw-r--r--cpan/Pod-Simple/t/xhtml01.t28
-rw-r--r--cpan/Pod-Simple/t/xhtml05.t2
34 files changed, 268 insertions, 57 deletions
diff --git a/cpan/Pod-Simple/ChangeLog b/cpan/Pod-Simple/ChangeLog
index fa17d2c578..2c55d5598c 100644
--- a/cpan/Pod-Simple/ChangeLog
+++ b/cpan/Pod-Simple/ChangeLog
@@ -1,6 +1,36 @@
# ChangeLog for Pod::Simple dist
#---------------------------------------------------------------------------
+2010-11-11 David E. Wheeler <david@justatheory.org>
+ * Release 3.15
+
+ Removed "perlpod.pod" and "perlpodspec.pod". These now just live
+ in the Perl core.
+
+ Fixed stylesheet names output by HTMLBatch to match the names of
+ the actual stylesheet files (broken in 3.09). Thanks to Kevin Ryde
+ for the report (RT #56725).
+
+ Added missing closing slash to the CSS links in the XHTML output.
+ Thanks to HarleyPig for the patch!
+
+ Added parens around bar "qw(...)" in t/xhtml05.t. Thanks to Jerry
+ D. Hedden for the patch.
+
+ Improved the Pod::Simple::HTML docs. Thanks to Gabor Szabo for the
+ patch.
+
+ Pod::Simple::XHTML now properly encodes entities in URLs in the
+ anchor tag. Thanks to John McNamara for the report (RT-60249).
+
+ Pod::Simple::HTML and XHTML now strip whitespace from the end of
+ section names that appear as anchor names for headers (in HTML)
+ and IDs (in XHTML). Such whitespace appeared when "X<>" entities
+ were stripped out but not the space between them (RT-56572).
+
+ Make test "t/search50.t" always pass on case-insensitive file
+ systems rather than just skip VMS.
+
2009-04-27
* Release 3.14
diff --git a/cpan/Pod-Simple/README b/cpan/Pod-Simple/README
index 9ab762b048..2562fd9971 100644
--- a/cpan/Pod-Simple/README
+++ b/cpan/Pod-Simple/README
@@ -1,4 +1,4 @@
-=head1 Pod::Simple version 3.14
+=head1 Pod::Simple version 3.15
Pod::Simple is a Perl library for parsing text in the Pod ("plain old
documentation") markup language that is typically used for writing
diff --git a/cpan/Pod-Simple/lib/Pod/Simple.pm b/cpan/Pod-Simple/lib/Pod/Simple.pm
index 51f9a69801..bd03190168 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.14';
+$VERSION = '3.15';
@Known_formatting_codes = qw(I B C L E F S X Z);
%Known_formatting_codes = map(($_=>1), @Known_formatting_codes);
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm b/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm
index 9917898cff..8ea9ee92ee 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.14';
+$VERSION = '3.15';
#use constant DEBUG => 7;
BEGIN {
require Pod::Simple;
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm b/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm
index 26a6023723..3bfd67f17a 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.14';
+$VERSION = '3.15';
@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 1349be32cb..a620204dbe 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.14';
+$VERSION = '3.15';
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 91554341e3..327b9a894c 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.14';
+$VERSION = '3.15';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm
index d83f8d33f5..84f5c8bb4d 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.14';
+$VERSION = '3.15';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm b/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm
index b1a75cb4e3..21bf7c24fd 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.14';
+$VERSION = '3.15';
BEGIN {
if(defined &DEBUG) { } # no-op
@@ -81,7 +81,7 @@ __PACKAGE__->_accessorize(
# out of apparently longstanding habit)
'html_css', # URL of CSS file to point to
- 'html_javascript', # URL of CSS file to point to
+ 'html_javascript', # URL of Javascript file to point to
'force_title', # should already be &-escaped
'default_title', # should already be &-escaped
@@ -685,6 +685,8 @@ sub section_escape {
sub section_name_tidy {
my($self, $section) = @_;
+ $section =~ s/^\s+//;
+ $section =~ s/\s+$//;
$section =~ tr/ /_/;
$section =~ tr/\x00-\x1F\x80-\x9F//d if 'A' eq chr(65); # drop crazy characters
$section = $self->unicode_escape_url($section);
@@ -897,25 +899,176 @@ TODO
=head1 CALLING FROM PERL
-TODO make a new object, set any options, and use parse_from_file
+=head2 Minimal code
+ use Pod::Simple::HTML;
+ my $html;
+ $p->output_string(\$html);
+ $p->parse_from_file('path/to/Module/Name.pm');
+ open my $out, '>', 'out.html' or die;
+ print $out $html;
+
+=head2 More detailed example
+
+ use Pod::Simple::HTML;
+
+Set the content type:
+
+ $Pod::Simple::HTML::Content_decl = q{<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >};
+
+ my $p = Pod::Simple::HTML->new;
+
+Include a single javascript source:
+
+ $p->html_javascript('http://abc.com/a.js');
+
+Or insert multiple javascript source in the header
+(or for that matter include anything, thought this is not recommended)
+
+ $p->html_javascript('
+ <script type="text/javascript" src="http://abc.com/b.js"></script>
+ <script type="text/javascript" src="http://abc.com/c.js"></script>');
+
+Include a single css source in the header:
+
+ $p->html_css('/style.css');
+
+or insert multiple css sources:
+
+ $p->html_css('
+ <link rel="stylesheet" type="text/css" title="pod_stylesheet" href="http://remote.server.com/jquery.css">
+ <link rel="stylesheet" type="text/css" title="pod_stylesheet" href="/style.css">');
+
+Tell the parser where should the output go. In this case it will be placed in the $html variable:
+
+ my $html;
+ $p->output_string(\$html);
+
+Parse and process a file with pod in it:
+
+ $p->parse_from_file('path/to/Module/Name.pm');
=head1 METHODS
TODO
all (most?) accessorized methods
+The following variables need to be set B<before> the call to the ->new constructor.
+
+Set the string that is included before the opening <html> tag:
+
+ $Pod::Simple::HTML::Doctype_decl = qq{<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">\n};
+
+Set the content-type in the HTML head: (defaults to ISO-8859-1)
+
+ $Pod::Simple::HTML::Content_decl = q{<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >};
+
+Set the value that will be ebedded in the opening tags of F, C tags and verbatim text.
+F maps to <em>, C maps to <code>, Verbatim text maps to <pre> (Computerese defaults to "")
+
+ $Pod::Simple::HTML::Computerese = ' class="some_class_name';
+
+=head2 html_css
+
+=head2 html_javascript
+
+=head2 title_prefix
+
+=head2 title_postfix
+
+=head2 html_header_before_title
+
+This includes everything before the <title> opening tag including the Document type
+and including the opening <title> tag. The following call will set it to be a simple HTML
+file:
+
+ $p->html_header_before_title('<html><head><title>');
+
+=head2 html_h_level
+
+Normally =head1 will become <h1>, =head2 will become <h2> etc.
+Using the html_h_level method will change these levels setting the h level
+of =head1 tags:
+
+ $p->html_h_level(3);
+
+Will make sure that =head1 will become <h3> and =head2 will become <h4> etc...
+
+
+=head2 index
+
+Set it to some true value if you want to have an index (in reality a table of contents)
+to be added at the top of the generated HTML.
+
+ $p->index(1);
+
+=head2 html_header_after_title
+
+Includes the closing tag of </title> and throught the rest of the head
+till the opening of the body
+
+ $p->html_header_after_title('</title>...</head><body id="my_id">');
+
+=head2 html_footer
+
+The very end of the document:
+
+ $p->html_footer( qq[\n<!-- end doc -->\n\n</body></html>\n] );
=head1 SUBCLASSING
-TODO
+Can use any of the methods described above but for further customization
+one needs to override some of the methods:
+
+ package My::Pod;
+ use strict;
+ use warnings;
+
+ use base 'Pod::Simple::HTML';
+
+ # needs to return a URL string such
+ # http://some.other.com/page.html
+ # #anchor_in_the_same_file
+ # /internal/ref.html
+ sub do_pod_link {
+ # My::Pod object and Pod::Simple::PullParserStartToken object
+ my ($self, $link) = @_;
+
+ say $link->tagname; # will be L for links
+ say $link->attr('to'); #
+ say $link->attr('type'); # will be 'pod' always
+ say $link->attr('section');
+
+ # Links local to our web site
+ if ($link->tagname eq 'L' and $link->attr('type') eq 'pod') {
+ my $to = $link->attr('to');
+ if ($to =~ /^Padre::/) {
+ $to =~ s{::}{/}g;
+ return "/docs/Padre/$to.html";
+ }
+ }
- can just set any of: html_css html_javascript title_prefix
- 'html_header_before_title',
- 'html_header_after_title',
- 'html_footer',
+ # all other links are generated by the parent class
+ my $ret = $self->SUPER::do_pod_link($link);
+ return $ret;
+ }
-maybe override do_pod_link
+ 1;
+
+Meanwhile in script.pl:
+
+ use My::Pod;
+
+ my $p = My::Pod->new;
+
+ my $html;
+ $p->output_string(\$html);
+ $p->parse_from_file('path/to/Module/Name.pm');
+ open my $out, '>', 'out.html' or die;
+ print $out $html;
+
+TODO
maybe override do_beginning do_end
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm b/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm
index 227c23b7f9..52b8a802f0 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.14';
+$VERSION = '3.15';
@ISA = (); # Yup, we're NOT a subclass of Pod::Simple::HTML!
# TODO: nocontents stylesheets. Strike some of the color variations?
@@ -726,7 +726,7 @@ sub _gen_css_wad {
'whtgrng', # white_with_green_on_grey
'grygrnw', # grey_with_green_on_white
) {
- my $outname = "$variation\_";
+ my $outname = $variation;
my $this_css = join "\n",
"/* This file is autogenerated. Do not edit. $outname */\n",
"\@import url(\"./_$variation.css\");",
@@ -735,7 +735,7 @@ sub _gen_css_wad {
;
my $name = $outname;
$name =~ tr/-_/ /;
- $self->add_css( "$outname.css", 0, $name, 0, 0, \$this_css);
+ $self->add_css( "_$outname.css", 0, $name, 0, 0, \$this_css);
}
return;
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm b/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm
index e426b2c547..185b2b67e8 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.14';
+$VERSION = '3.15';
use strict;
use Pod::Simple::BlackBox;
use vars qw($VERSION );
-$VERSION = '3.14';
+$VERSION = '3.15';
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 bed3e8662b..2c28602175 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.14';
+$VERSION = '3.15';
@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 7de46d5696..03bff6772c 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.14';
+$VERSION = '3.15';
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 c27d0cbeb0..9c8378e554 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.14';
+$VERSION = '3.15';
use Pod::Simple ();
BEGIN {@ISA = ('Pod::Simple')}
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm
index 67a625d887..21ae23fe9c 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.14';
+$VERSION = '3.15';
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 37d68ef619..d346e39243 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.14';
+$VERSION = '3.15';
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 ed6340d598..ad72a89a46 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.14';
+$VERSION = '3.15';
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 2234ccf7ad..861a1d26bc 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.14';
+$VERSION = '3.15';
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 f476d37b24..71ba107d60 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.14';
+$VERSION = '3.15';
use Pod::Simple::PullParser ();
BEGIN {@ISA = ('Pod::Simple::PullParser')}
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Search.pm b/cpan/Pod-Simple/lib/Pod/Simple/Search.pm
index 762701aa9c..bb9371a24d 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.14'; ## Current version of this package
+$VERSION = '3.15'; ## 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 32db4b6a51..92cf7b95b0 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.14';
+$VERSION = '3.15';
BEGIN {
@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 f2011d5a5c..426fa8911e 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod
+++ b/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod
@@ -887,6 +887,8 @@ L<Pod::Simple::Text> -- a simple plaintext formatter for Pod
L<Pod::Simple::TextContent> -- like Pod::Simple::Text, but
makes no effort for indent or wrap the text being formatted
+L<Pod::Simple::HTML> -- a simple HTML formatter for Pod
+
L<perlpod|perlpod>
L<perlpodspec|perlpodspec>
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Text.pm b/cpan/Pod-Simple/lib/Pod/Simple/Text.pm
index 81fde4e7a7..6f05f89832 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.14';
+$VERSION = '3.15';
@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 914c7fd166..5220698456 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.14';
+$VERSION = '3.15';
@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 c5d4483b28..13c7ec7d46 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.14';
+$VERSION = '3.15';
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm b/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm
index 258d0d7676..9ee47964f5 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.14';
+$VERSION = '3.15';
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 d1c320d5d1..95b5fc86e2 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.14';
+$VERSION = '3.15';
# 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 bab59fc897..8979bd27bf 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.14';
+$VERSION = '3.15';
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 6a8fb7e97e..e160b30db8 100644
--- a/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm
+++ b/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm
@@ -28,7 +28,7 @@ L<Pod::Simple::HTML>, but it largely preserves the same interface.
package Pod::Simple::XHTML;
use strict;
use vars qw( $VERSION @ISA $HAS_HTML_ENTITIES );
-$VERSION = '3.14';
+$VERSION = '3.15';
use Carp ();
use Pod::Simple::Methody ();
@ISA = ('Pod::Simple::Methody');
@@ -165,7 +165,7 @@ __PACKAGE__->_accessorize(
'man_url_prefix',
'man_url_postfix',
'title_prefix', 'title_postfix',
- 'html_css',
+ 'html_css',
'html_javascript',
'html_doctype',
'html_header_tags',
@@ -372,7 +372,7 @@ sub end_item_text {
}
# This handles =begin and =for blocks of all kinds.
-sub start_for {
+sub start_for {
my ($self, $flags) = @_;
push @{ $self->{__region_targets} }, $flags->{target_matching};
@@ -386,7 +386,7 @@ sub start_for {
$self->emit;
}
-sub end_for {
+sub end_for {
my ($self) = @_;
$self->{'scratch'} .= '</div>' unless $self->__in_literal_xhtml_region;
@@ -395,7 +395,7 @@ sub end_for {
$self->emit;
}
-sub start_Document {
+sub start_Document {
my ($self) = @_;
if (defined $self->html_header) {
$self->{'scratch'} .= $self->html_header;
@@ -407,7 +407,7 @@ sub start_Document {
$metatags = $self->html_header_tags || '';
if ($self->html_css) {
$metatags .= "\n<link rel='stylesheet' href='" .
- $self->html_css . "' type='text/css'>";
+ $self->html_css . "' type='text/css' />";
}
if ($self->html_javascript) {
$metatags .= "\n<script type='text/javascript' src='" .
@@ -500,10 +500,12 @@ sub end_I { $_[0]{'scratch'} .= '</i>' }
sub start_L {
my ($self, $flags) = @_;
my ($type, $to, $section) = @{$flags}{'type', 'to', 'section'};
- my $url = $type eq 'url' ? $to
+ my $url = encode_entities(
+ $type eq 'url' ? $to
: $type eq 'pod' ? $self->resolve_pod_page_link($to, $section)
: $type eq 'man' ? $self->resolve_man_page_link($to, $section)
- : undef;
+ : undef
+ );
# If it's an unknown type, use an attribute-less <a> like HTML.pm.
$self->{'scratch'} .= '<a' . ($url ? ' href="'. $url . '">' : '>');
@@ -627,6 +629,7 @@ sub idify {
for ($t) {
s/<[^>]+>//g; # Strip HTML.
s/&[^;]+;//g; # Strip entities.
+ s/^\s+//; s/\s+$//; # Strip white space.
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.
diff --git a/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm b/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm
index 2e6b42834e..0cd1a70e73 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.14';
+$VERSION = '3.15';
BEGIN {
@ISA = ('Pod::Simple');
*DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG;
diff --git a/cpan/Pod-Simple/t/html01.t b/cpan/Pod-Simple/t/html01.t
index 96163703f6..5ad848ebfa 100644
--- a/cpan/Pod-Simple/t/html01.t
+++ b/cpan/Pod-Simple/t/html01.t
@@ -9,7 +9,7 @@ BEGIN {
use strict;
use Test;
-BEGIN { plan tests => 11 };
+BEGIN { plan tests => 12 };
#use Pod::Simple::Debug (10);
@@ -78,6 +78,13 @@ ok(x(
"heading building"
);
+ok(x(
+'=head2 Yada Yada Operator
+X<...> X<... operator> X<yada yada operator>')
+ => q{/name="Yada_Yada_Operator"/},
+ "heading anchor name"
+);
+
ok(
x("=over 4\n\n=item one\n\n=item two\n\nHello\n\n=back\n"),
q{
diff --git a/cpan/Pod-Simple/t/search50.t b/cpan/Pod-Simple/t/search50.t
index 195a8f150c..b9b67a28bc 100644
--- a/cpan/Pod-Simple/t/search50.t
+++ b/cpan/Pod-Simple/t/search50.t
@@ -77,9 +77,9 @@ if( $testmod ) {
print "# Comparing \"$x[0]\" to \"$x[1]\"\n";
for(@x) { s{[/\\]}{/}g; }
print "# => \"$x[0]\" to \"$x[1]\"\n";
- skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
- $x[0],
- $x[1],
+ ok
+ lc $x[0],
+ lc $x[1],
" find('$testmod') should match survey's name2where{$testmod}";
} else {
ok 0; # no 'thatpath/<name>.pm' means can't test find()
diff --git a/cpan/Pod-Simple/t/xhtml01.t b/cpan/Pod-Simple/t/xhtml01.t
index e51df80cc9..1b43220682 100644
--- a/cpan/Pod-Simple/t/xhtml01.t
+++ b/cpan/Pod-Simple/t/xhtml01.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use lib '../lib';
-use Test::More tests => 48;
+use Test::More tests => 50;
#use Test::More 'no_plan';
use_ok('Pod::Simple::XHTML') or exit;
@@ -26,6 +26,11 @@ $parser->parse_string_document( "=head1 Poit!" );
is($results, qq{<h1 id="Poit-">Poit!</h1>\n\n}, "head1 level output");
initialize($parser, $results);
+$parser->parse_string_document( "=head2 Yada Yada Operator
+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->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");
@@ -76,13 +81,13 @@ B: Now, Pinky, if by any chance you are captured during this mission,
remember you are Gunther Heindriksen from Appenzell. You moved to
Grindelwald to drive the cog train to Murren. Can you repeat that?
-P: Mmmm, no, Brain, don't think I can.
+P: Mmmm, no, Brain, dont think I can.
EOPOD
is($results, <<'EOHTML', "multiple paragraphs");
<p>B: Now, Pinky, if by any chance you are captured during this mission, remember you are Gunther Heindriksen from Appenzell. You moved to Grindelwald to drive the cog train to Murren. Can you repeat that?</p>
-<p>P: Mmmm, no, Brain, don&#39;t think I can.</p>
+<p>P: Mmmm, no, Brain, dont think I can.</p>
EOHTML
@@ -400,7 +405,7 @@ $parser->parse_string_document(<<'EOPOD');
A plain paragraph with body tags and css tags turned on.
EOPOD
-like($results, qr/<link rel='stylesheet' href='style.css' type='text\/css'>/,
+like($results, qr/<link rel='stylesheet' href='style.css' type='text\/css' \/>/,
"adding html body tags and css tags");
@@ -463,6 +468,17 @@ initialize($parser, $results);
$parser->parse_string_document(<<'EOPOD');
=pod
+A plain paragraph with a L<http://link.included.here?o=1&p=2>.
+EOPOD
+is($results, <<"EOHTML", "A link in a paragraph");
+<p>A plain paragraph with a <a href="http://link.included.here?o=1&amp;p=2">http://link.included.here?o=1&amp;p=2</a>.</p>
+
+EOHTML
+
+initialize($parser, $results);
+$parser->parse_string_document(<<'EOPOD');
+=pod
+
A plain paragraph with B<bold text>.
EOPOD
is($results, <<"EOHTML", "Bold text in a paragraph");
@@ -540,12 +556,12 @@ SKIP: for my $use_html_entities (0, 1) {
=pod
# this header is very important & dont you forget it
- B<my $file = <FILEE<gt> || 'Blank!';>
+ B<my $file = <FILEE<gt> || Blank!;>
my $text = "File is: " . <FILE>;
EOPOD
is($results, <<"EOHTML", "Verbatim text with markup and embedded formatting");
<pre><code> # this header is very important &amp; dont you forget it
- <b>my \$file = &lt;FILE&gt; || &#39;Blank!&#39;;</b>
+ <b>my \$file = &lt;FILE&gt; || Blank!;</b>
my \$text = &quot;File is: &quot; . &lt;FILE&gt;;</code></pre>
EOHTML
diff --git a/cpan/Pod-Simple/t/xhtml05.t b/cpan/Pod-Simple/t/xhtml05.t
index 4e2738ee7f..00d5589613 100644
--- a/cpan/Pod-Simple/t/xhtml05.t
+++ b/cpan/Pod-Simple/t/xhtml05.t
@@ -33,7 +33,7 @@ is($results, <<'EOHTML', "a for block");
EOHTML
-foreach my $target qw(note tip warning) {
+foreach my $target (qw(note tip warning)) {
initialize($parser, $results);
$parser->accept_targets_as_text( $target );
$parser->parse_string_document(<<"EOPOD");