Change 34000 by [EMAIL PROTECTED] on 2008/06/05 12:56:53
Upgrade to Pod-Simple-3.07
Affected files ...
... //depot/perl/lib/Pod/Simple.pm#5 edit
... //depot/perl/lib/Pod/Simple/XHTML.pm#2 edit
... //depot/perl/lib/Pod/Simple/t/xhtml01.t#2 edit
Differences ...
==== //depot/perl/lib/Pod/Simple.pm#5 (text) ====
Index: perl/lib/Pod/Simple.pm
--- perl/lib/Pod/Simple.pm#4~33997~ 2008-06-04 12:20:20.000000000 -0700
+++ perl/lib/Pod/Simple.pm 2008-06-05 05:56:53.000000000 -0700
@@ -18,7 +18,7 @@
);
@ISA = ('Pod::Simple::BlackBox');
-$VERSION = '3.06';
+$VERSION = '3.07';
@Known_formatting_codes = qw(I B C L E F S X Z);
%Known_formatting_codes = map(($_=>1), @Known_formatting_codes);
==== //depot/perl/lib/Pod/Simple/XHTML.pm#2 (text) ====
Index: perl/lib/Pod/Simple/XHTML.pm
--- perl/lib/Pod/Simple/XHTML.pm#1~33997~ 2008-06-04 12:20:20.000000000
-0700
+++ perl/lib/Pod/Simple/XHTML.pm 2008-06-05 05:56:53.000000000 -0700
@@ -27,13 +27,31 @@
package Pod::Simple::XHTML;
use strict;
-use vars qw( $VERSION @ISA );
+use vars qw( $VERSION @ISA $HAS_HTML_ENTITIES );
$VERSION = '3.04';
use Carp ();
use Pod::Simple::Methody ();
@ISA = ('Pod::Simple::Methody');
-use HTML::Entities 'encode_entities';
+BEGIN {
+ $HAS_HTML_ENTITIES = eval "require HTML::Entities; 1";
+}
+
+my %entities = (
+ q{>} => 'gt',
+ q{<} => 'lt',
+ q{'} => '#39',
+ q{"} => 'quot',
+ q{&} => 'amp',
+);
+
+sub encode_entities {
+ return HTML::Entities::encode_entities( $_[0] ) if $HAS_HTML_ENTITIES;
+ my $str = $_[0];
+ my $ents = join '', keys %entities;
+ $str =~ s/([$ents])/'&' . $entities{$1} . ';'/ge;
+ return $str;
+}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==== //depot/perl/lib/Pod/Simple/t/xhtml01.t#2 (text) ====
Index: perl/lib/Pod/Simple/t/xhtml01.t
--- perl/lib/Pod/Simple/t/xhtml01.t#1~33997~ 2008-06-04 12:20:20.000000000
-0700
+++ perl/lib/Pod/Simple/t/xhtml01.t 2008-06-05 05:56:53.000000000 -0700
@@ -8,7 +8,7 @@
use strict;
use lib '../lib';
-use Test::More tests => 25;
+use Test::More tests => 26;
use_ok('Pod::Simple::XHTML') or exit;
@@ -318,8 +318,13 @@
EOHTML
-initialize($parser, $results);
-$parser->parse_string_document(<<'EOPOD');
+SKIP: for my $use_html_entities (0, 1) {
+ if ($use_html_entities and not $Pod::Simple::XHTML::HAS_HTML_ENTITIES) {
+ skip("HTML::Entities not installed", 1);
+ }
+ local $Pod::Simple::XHTML::HAS_HTML_ENTITIES = $use_html_entities;
+ initialize($parser, $results);
+ $parser->parse_string_document(<<'EOPOD');
=pod
# this header is very important & don't you forget it
@@ -332,6 +337,7 @@
my \$text = "File is: " . <FILE>;</code></pre>
EOHTML
+}
######################################
End of Patch.