summaryrefslogtreecommitdiff
path: root/cpan/Pod-Simple
diff options
context:
space:
mode:
authorDavid E. Wheeler <david@kineticode.com>2009-11-12 11:13:06 -0800
committerDavid Golden <dagolden@cpan.org>2009-11-12 14:43:38 -0500
commit4b6b311b63d14c1231c993fab0b079ccf5fc6026 (patch)
tree6f8c2c7cca3e29751e514a51f7d349bf60f4ae69 /cpan/Pod-Simple
parent1bf4246c822bcdde792cfe79ba9827340173af48 (diff)
downloadperl-4b6b311b63d14c1231c993fab0b079ccf5fc6026.tar.gz
Bring Pod::Simple up to 3.10
This is the same as the version just released to CPAN. Notable changes are skipping failing tests on VMS and fixing nested definition lists in the XHTML formatter.
Diffstat (limited to 'cpan/Pod-Simple')
-rw-r--r--cpan/Pod-Simple/ChangeLog17
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple.pm2
-rw-r--r--cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm27
-rw-r--r--cpan/Pod-Simple/t/xhtml01.t105
4 files changed, 143 insertions, 8 deletions
diff --git a/cpan/Pod-Simple/ChangeLog b/cpan/Pod-Simple/ChangeLog
index c36a6f1f85..8aa779da92 100644
--- a/cpan/Pod-Simple/ChangeLog
+++ b/cpan/Pod-Simple/ChangeLog
@@ -1,6 +1,21 @@
# ChangeLog for Pod::Simple dist
#---------------------------------------------------------------------------
+2009-11-12 David E. Wheeler <david@justatheory.org>
+ * Release 3.10
+
+ Converted test files that had DOS enedings to have Unix endings
+ (RT #50922 from Steve Hay).
+
+ Skip tests on VMS where the lack of filename case preservation can
+ wreak havoc (RT #51184 from Craig A. Berry).
+
+ Fix nested definition list format in the XHTML output
+ (RT #51187 from Lars Dɪᴇᴄᴋᴏᴡ).
+
+ Added some files missing from the MANIFEST (and therefore the
+ distribution) in the last two releases.
+
2009-10-27 Allison Randal <allison@perl.org>
* Release 3.09
@@ -187,7 +202,7 @@
crazy, I've tried to basically turn off all Unicode/utf8 support
under 5.6. Under 5.8 and above, Unicode should work fine, and
under 5.6, all Unicode characters should be replaced with a little
- "can't render" symbol, either a "" or a "?".
+ "can't render" symbol, either a "¤" or a "?".
Many many thanks to Jarkko Hietaniemi for helping out.
(Works under 5.005 now too?)
diff --git a/cpan/Pod-Simple/lib/Pod/Simple.pm b/cpan/Pod-Simple/lib/Pod/Simple.pm
index 566686e0d6..ae4aaff613 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.09_01';
+$VERSION = '3.10';
@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/XHTML.pm b/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm
index e04da3b59b..e4d66348c2 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.09';
+$VERSION = '3.10';
use Carp ();
use Pod::Simple::Methody ();
@ISA = ('Pod::Simple::Methody');
@@ -250,14 +250,22 @@ sub start_item_bullet {
}
sub start_item_text {
- $_[0]{'scratch'} = "</dd>\n" if delete $_[0]{'in_dd'};
+ if ($_[0]{'in_dd'}[ $_[0]{'dl_level'} ]) {
+ $_[0]{'scratch'} = "</dd>\n";
+ $_[0]{'in_dd'}[ $_[0]{'dl_level'} ] = 0;
+ }
$_[0]{'scratch'} .= '<dt>';
}
sub start_over_bullet { $_[0]{'scratch'} = '<ul>'; $_[0]->emit }
-sub start_over_text { $_[0]{'scratch'} = '<dl>'; $_[0]->emit }
sub start_over_block { $_[0]{'scratch'} = '<ul>'; $_[0]->emit }
sub start_over_number { $_[0]{'scratch'} = '<ol>'; $_[0]->emit }
+sub start_over_text {
+ $_[0]{'scratch'} = '<dl>';
+ $_[0]{'dl_level'}++;
+ $_[0]{'in_dd'} ||= [];
+ $_[0]->emit
+}
sub end_over_block { $_[0]{'scratch'} .= '</ul>'; $_[0]->emit }
@@ -274,8 +282,12 @@ sub end_over_bullet {
}
sub end_over_text {
- $_[0]{'scratch'} = "</dd>\n" if delete $_[0]{'in_dd'};
+ if ($_[0]{'in_dd'}[ $_[0]{'dl_level'} ]) {
+ $_[0]{'scratch'} = "</dd>\n";
+ $_[0]{'in_dd'}[ $_[0]{'dl_level'} ] = 0;
+ }
$_[0]{'scratch'} .= '</dl>';
+ $_[0]{'dl_level'}--;
$_[0]->emit;
}
@@ -303,7 +315,12 @@ sub end_head4 { shift->_end_head(@_); }
sub end_item_bullet { $_[0]{'scratch'} .= '</p>'; $_[0]->emit }
sub end_item_number { $_[0]{'scratch'} .= '</p>'; $_[0]->emit }
-sub end_item_text { $_[0]{'scratch'} .= "</dt>\n<dd>"; $_[0]{'in_dd'} = 1; $_[0]->emit }
+
+sub end_item_text {
+ $_[0]{'scratch'} .= "</dt>\n<dd>";
+ $_[0]{'in_dd'}[ $_[0]{'dl_level'} ] = 1;
+ $_[0]->emit;
+}
# This handles =begin and =for blocks of all kinds.
sub start_for {
diff --git a/cpan/Pod-Simple/t/xhtml01.t b/cpan/Pod-Simple/t/xhtml01.t
index d2723904cd..8517dda699 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 => 33;
+use Test::More tests => 35;
use_ok('Pod::Simple::XHTML') or exit;
@@ -220,6 +220,109 @@ is($results, <<'EOHTML', "bulleted author list");
EOHTML
+initialize($parser, $results);
+$parser->parse_string_document(<<'EOPOD');
+=over
+
+=item Pinky
+
+=over
+
+=item World Domination
+
+=back
+
+=item Brain
+
+=back
+
+EOPOD
+
+is($results, <<'EOHTML', 'nested lists');
+<dl>
+
+<dt>Pinky</dt>
+<dd>
+
+<dl>
+
+<dt>World Domination</dt>
+<dd>
+
+</dd>
+</dl>
+
+</dd>
+<dt>Brain</dt>
+<dd>
+
+</dd>
+</dl>
+
+EOHTML
+
+initialize($parser, $results);
+$parser->parse_string_document(<<'EOPOD');
+=over
+
+=item Pinky
+
+On the list:
+
+=over
+
+=item World Domination
+
+Fight the good fight
+
+=item Go to Europe
+
+(Steve Martin joke)
+
+=back
+
+=item Brain
+
+Not so much
+
+=back
+
+EOPOD
+
+is($results, <<'EOHTML', 'multiparagraph nested lists');
+<dl>
+
+<dt>Pinky</dt>
+<dd>
+
+<p>On the list:</p>
+
+<dl>
+
+<dt>World Domination</dt>
+<dd>
+
+<p>Fight the good fight</p>
+
+</dd>
+<dt>Go to Europe</dt>
+<dd>
+
+<p>(Steve Martin joke)</p>
+
+</dd>
+</dl>
+
+</dd>
+<dt>Brain</dt>
+<dd>
+
+<p>Not so much</p>
+
+</dd>
+</dl>
+
+EOHTML
initialize($parser, $results);
$parser->parse_string_document(<<'EOPOD');