From: David E. Wheeler Date: Thu, 12 Nov 2009 19:13:06 +0000 (-0800) Subject: Bring Pod::Simple up to 3.10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4b6b311b63d14c1231c993fab0b079ccf5fc6026;p=p5sagit%2Fp5-mst-13.2.git 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. --- diff --git a/cpan/Pod-Simple/ChangeLog b/cpan/Pod-Simple/ChangeLog index c36a6f1..8aa779d 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 + * 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 * 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 566686e..ae4aaff 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 e04da3b..e4d6634 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm @@ -28,7 +28,7 @@ L, 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'} = "\n" if delete $_[0]{'in_dd'}; + if ($_[0]{'in_dd'}[ $_[0]{'dl_level'} ]) { + $_[0]{'scratch'} = "\n"; + $_[0]{'in_dd'}[ $_[0]{'dl_level'} ] = 0; + } $_[0]{'scratch'} .= '
'; } sub start_over_bullet { $_[0]{'scratch'} = '
    '; $_[0]->emit } -sub start_over_text { $_[0]{'scratch'} = '
    '; $_[0]->emit } sub start_over_block { $_[0]{'scratch'} = '
      '; $_[0]->emit } sub start_over_number { $_[0]{'scratch'} = '
        '; $_[0]->emit } +sub start_over_text { + $_[0]{'scratch'} = '
        '; + $_[0]{'dl_level'}++; + $_[0]{'in_dd'} ||= []; + $_[0]->emit +} sub end_over_block { $_[0]{'scratch'} .= '
    '; $_[0]->emit } @@ -274,8 +282,12 @@ sub end_over_bullet { } sub end_over_text { - $_[0]{'scratch'} = "\n" if delete $_[0]{'in_dd'}; + if ($_[0]{'in_dd'}[ $_[0]{'dl_level'} ]) { + $_[0]{'scratch'} = "\n"; + $_[0]{'in_dd'}[ $_[0]{'dl_level'} ] = 0; + } $_[0]{'scratch'} .= '
    '; + $_[0]{'dl_level'}--; $_[0]->emit; } @@ -303,7 +315,12 @@ sub end_head4 { shift->_end_head(@_); } sub end_item_bullet { $_[0]{'scratch'} .= '

    '; $_[0]->emit } sub end_item_number { $_[0]{'scratch'} .= '

    '; $_[0]->emit } -sub end_item_text { $_[0]{'scratch'} .= "
\n
"; $_[0]{'in_dd'} = 1; $_[0]->emit } + +sub end_item_text { + $_[0]{'scratch'} .= "\n
"; + $_[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 d272390..8517dda 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'); +
+ +
Pinky
+
+ +
+ +
World Domination
+
+ +
+
+ +
+
Brain
+
+ +
+
+ +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'); +
+ +
Pinky
+
+ +

On the list:

+ +
+ +
World Domination
+
+ +

Fight the good fight

+ +
+
Go to Europe
+
+ +

(Steve Martin joke)

+ +
+
+ +
+
Brain
+
+ +

Not so much

+ +
+
+ +EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD');