Update Pod-Simple to CPAN version 3.18
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sun, 17 Jul 2011 09:17:39 +0000 (10:17 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sun, 17 Jul 2011 09:17:39 +0000 (10:17 +0100)
  [DELTA]

  2011-07-16   David E. Wheeler <david@justatheory.org>
        * Release 3.18

        Pod::Simple now properly parses Pod files using Mac OS Classic line-
        endings (\r). Marc Green/Google Summer of Code.

        Fixed test failure in 't/search50.t when the test finds a .pod but
        the module is in a .pm. Thanks to the cpan-testers who reported
        this when the test searched for Capture::Tiny.

32 files changed:
Porting/Maintainers.pl
cpan/Pod-Simple/ChangeLog
cpan/Pod-Simple/README
cpan/Pod-Simple/lib/Pod/Simple.pm
cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm
cpan/Pod-Simple/lib/Pod/Simple/Checker.pm
cpan/Pod-Simple/lib/Pod/Simple/Debug.pm
cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm
cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm
cpan/Pod-Simple/lib/Pod/Simple/HTML.pm
cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm
cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm
cpan/Pod-Simple/lib/Pod/Simple/Methody.pm
cpan/Pod-Simple/lib/Pod/Simple/Progress.pm
cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm
cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm
cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm
cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm
cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm
cpan/Pod-Simple/lib/Pod/Simple/RTF.pm
cpan/Pod-Simple/lib/Pod/Simple/Search.pm
cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm
cpan/Pod-Simple/lib/Pod/Simple/Text.pm
cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm
cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm
cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm
cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm
cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm
cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm
cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm
cpan/Pod-Simple/t/search50.t
pod/perldelta.pod

index 6c4d2a5..c67ef7d 100755 (executable)
@@ -1568,7 +1568,7 @@ use File::Glob qw(:case);
     'Pod::Simple' =>
        {
        'MAINTAINER'    => 'arandal',
-       'DISTRIBUTION'  => 'DWHEELER/Pod-Simple-3.17.tar.gz',
+       'DISTRIBUTION'  => 'DWHEELER/Pod-Simple-3.18.tar.gz',
        'FILES'         => q[cpan/Pod-Simple],
        'UPSTREAM'      => 'cpan',
        },
index d47f926..3cc2442 100644 (file)
@@ -1,6 +1,16 @@
 # ChangeLog for Pod::Simple dist
 #---------------------------------------------------------------------------
 
+2011-07-16   David E. Wheeler <david@justatheory.org>
+       * Release 3.18
+
+       Pod::Simple now properly parses Pod files using Mac OS Classic line-
+       endings (\r). Marc Green/Google Summer of Code.
+
+       Fixed test failure in 't/search50.t when the test finds a .pod but
+       the module is in a .pm. Thanks to the cpan-testers who reported
+       this when the test searched for Capture::Tiny.
+
 2011-07-09   David E. Wheeler <david@justatheory.org>
        * Release 3.17
 
@@ -53,7 +63,7 @@
        spelled "=encode"). Thanks to "TTY" for the patch. (RT #24820).
 
 2010-11-11   David E. Wheeler <david@justatheory.org>
-       * Release 3.17
+       * Release 3.15
 
        Removed "perlpod.pod" and "perlpodspec.pod". These now just live
        in the Perl core.
 
        Just fixing some typos in the CSS generated by Pod::Simple:HTMLBatch.
 
-       
 2004-05-24   Sean M. Burke <sburke@cpan.org>
        * Release 3.01
 
index f213dc2..47f34ec 100644 (file)
@@ -1,4 +1,4 @@
-=head1 Pod::Simple version 3.17
+=head1 Pod::Simple version 3.18
 
 Pod::Simple is a Perl library for parsing text in the Pod ("plain old
 documentation") markup language that is typically used for writing
index 8ba9af8..d75c761 100644 (file)
@@ -18,7 +18,7 @@ use vars qw(
 );
 
 @ISA = ('Pod::Simple::BlackBox');
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 @Known_formatting_codes = qw(I B C L E F S X Z); 
 %Known_formatting_codes = map(($_=>1), @Known_formatting_codes);
@@ -356,7 +356,8 @@ sub parse_string_document {
     next unless defined $line_group and length $line_group;
     pos($line_group) = 0;
     while($line_group =~
-      m/([^\n\r]*)((?:\r?\n)?)/g
+      m/([^\n\r]*)(\r?\n?)/g # supports \r, \n ,\r\n
+      #m/([^\n\r]*)((?:\r?\n)?)/g
     ) {
       #print(">> $1\n"),
       $self->parse_lines($1)
@@ -406,16 +407,30 @@ sub parse_file {
   # By here, $source is a FH.
 
   $self->{'source_fh'} = $source;
-  
+
   my($i, @lines);
   until( $self->{'source_dead'} ) {
     splice @lines;
+
     for($i = MANY_LINES; $i--;) {  # read those many lines at a time
       local $/ = $NL;
       push @lines, scalar(<$source>);  # readline
       last unless defined $lines[-1];
        # but pass thru the undef, which will set source_dead to true
     }
+
+    my $at_eof = ! $lines[-1]; # keep track of the undef
+    pop @lines if $at_eof; # silence warnings
+
+    # be eol agnostic
+    s/\r\n?/\n/g for @lines;
+    # make sure there are only one line elements for parse_lines
+    @lines = split(/(?<=\n)/, join('', @lines));
+
+    # push the undef back after popping it to set source_dead to true
+    push @lines, undef if $at_eof;
+
     $self->parse_lines(@lines);
   }
   delete($self->{'source_fh'}); # so it can be GC'd
index 629563b..d8dfce4 100644 (file)
@@ -23,7 +23,7 @@ use integer; # vroom!
 use strict;
 use Carp ();
 use vars qw($VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 #use constant DEBUG => 7;
 BEGIN {
   require Pod::Simple;
index e5ff0f7..7f28f1e 100644 (file)
@@ -9,7 +9,7 @@ use Carp ();
 use Pod::Simple::Methody ();
 use Pod::Simple ();
 use vars qw( @ISA $VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 @ISA = ('Pod::Simple::Methody');
 BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG)
           ? \&Pod::Simple::DEBUG
index 1aa2da8..037900d 100644 (file)
@@ -3,7 +3,7 @@ require 5;
 package Pod::Simple::Debug;
 use strict;
 use vars qw($VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 sub import {
   my($value,$variable);
index f2177b2..42e8d7a 100644 (file)
@@ -1,7 +1,7 @@
 
 require 5;
 package Pod::Simple::DumpAsText;
-$VERSION = '3.17';
+$VERSION = '3.18';
 use Pod::Simple ();
 BEGIN {@ISA = ('Pod::Simple')}
 
index 40b94c0..9fb039d 100644 (file)
@@ -1,7 +1,7 @@
 
 require 5;
 package Pod::Simple::DumpAsXML;
-$VERSION = '3.17';
+$VERSION = '3.18';
 use Pod::Simple ();
 BEGIN {@ISA = ('Pod::Simple')}
 
index 54e87b2..b1063bb 100644 (file)
@@ -10,7 +10,7 @@ use vars qw(
   $Doctype_decl  $Content_decl
 );
 @ISA = ('Pod::Simple::PullParser');
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 BEGIN {
   if(defined &DEBUG) { } # no-op
index cfa2e4b..49ffd0c 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use vars qw( $VERSION $HTML_RENDER_CLASS $HTML_EXTENSION
  $CSS $JAVASCRIPT $SLEEPY $SEARCH_CLASS @ISA
 );
-$VERSION = '3.17';
+$VERSION = '3.18';
 @ISA = ();  # Yup, we're NOT a subclass of Pod::Simple::HTML!
 
 # TODO: nocontents stylesheets. Strike some of the color variations?
index 70dbb07..e04a503 100644 (file)
@@ -3,12 +3,12 @@ require 5;
 package Pod::Simple::LinkSection;
   # Based somewhat dimly on Array::Autojoin
 use vars qw($VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 use strict;
 use Pod::Simple::BlackBox;
 use vars qw($VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 use overload( # So it'll stringify nice
   '""'   => \&Pod::Simple::BlackBox::stringify_lol,
index 3df5227..6733394 100644 (file)
@@ -4,7 +4,7 @@ package Pod::Simple::Methody;
 use strict;
 use Pod::Simple ();
 use vars qw(@ISA $VERSION);
-$VERSION = '3.17';
+$VERSION = '3.18';
 @ISA = ('Pod::Simple');
 
 # Yes, we could use named variables, but I want this to be impose
index 1d54999..9afa1ab 100644 (file)
@@ -1,7 +1,7 @@
 
 require 5;
 package Pod::Simple::Progress;
-$VERSION = '3.17';
+$VERSION = '3.18';
 use strict;
 
 # Objects of this class are used for noting progress of an
index cf45e8a..dd2b776 100644 (file)
@@ -1,7 +1,7 @@
 
 require 5;
 package Pod::Simple::PullParser;
-$VERSION = '3.17';
+$VERSION = '3.18';
 use Pod::Simple ();
 BEGIN {@ISA = ('Pod::Simple')}
 
index 1adcf2e..a14fced 100644 (file)
@@ -5,7 +5,7 @@ use Pod::Simple::PullParserToken ();
 use strict;
 use vars qw(@ISA $VERSION);
 @ISA = ('Pod::Simple::PullParserToken');
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 sub new {  # Class->new(tagname);
   my $class = shift;
index 8906ae7..8f5bd59 100644 (file)
@@ -5,7 +5,7 @@ use Pod::Simple::PullParserToken ();
 use strict;
 use vars qw(@ISA $VERSION);
 @ISA = ('Pod::Simple::PullParserToken');
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 sub new {  # Class->new(tagname, optional_attrhash);
   my $class = shift;
index 0f6155f..c376ead 100644 (file)
@@ -5,7 +5,7 @@ use Pod::Simple::PullParserToken ();
 use strict;
 use vars qw(@ISA $VERSION);
 @ISA = ('Pod::Simple::PullParserToken');
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 sub new {  # Class->new(text);
   my $class = shift;
index a90538f..56b5818 100644 (file)
@@ -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.17';
+$VERSION = '3.18';
 use strict;
 
 sub new {  # Class->new('type', stuff...);  ## Overridden in derived classes anyway
index 7718b9e..19dc759 100644 (file)
@@ -8,7 +8,7 @@ package Pod::Simple::RTF;
 
 use strict;
 use vars qw($VERSION @ISA %Escape $WRAP %Tagmap);
-$VERSION = '3.17';
+$VERSION = '3.18';
 use Pod::Simple::PullParser ();
 BEGIN {@ISA = ('Pod::Simple::PullParser')}
 
index fca12fe..823c652 100644 (file)
@@ -4,7 +4,7 @@ package Pod::Simple::Search;
 use strict;
 
 use vars qw($VERSION $MAX_VERSION_WITHIN $SLEEPY);
-$VERSION = '3.17';   ## Current version of this package
+$VERSION = '3.18';   ## Current version of this package
 
 BEGIN { *DEBUG = sub () {0} unless defined &DEBUG; }   # set DEBUG level
 use Carp ();
index 8099895..fdea4a1 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use Carp ();
 use Pod::Simple ();
 use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS);
-$VERSION = '3.17';
+$VERSION = '3.18';
 BEGIN {
   @ISA = ('Pod::Simple');
   *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG;
index 1ed814c..04b01b2 100644 (file)
@@ -6,7 +6,7 @@ use Carp ();
 use Pod::Simple::Methody ();
 use Pod::Simple ();
 use vars qw( @ISA $VERSION $FREAKYMODE);
-$VERSION = '3.17';
+$VERSION = '3.18';
 @ISA = ('Pod::Simple::Methody');
 BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG)
           ? \&Pod::Simple::DEBUG
index d78373e..447fd9c 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use Carp ();
 use Pod::Simple ();
 use vars qw( @ISA $VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 @ISA = ('Pod::Simple');
 
 sub new {
index 2c2af0b..1f09805 100644 (file)
@@ -4,7 +4,7 @@ package Pod::Simple::TiedOutFH;
 use Symbol ('gensym');
 use Carp ();
 use vars qw($VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
index 266bade..17b73ae 100644 (file)
@@ -2,7 +2,7 @@
 require 5;
 package Pod::Simple::Transcode;
 use vars qw($VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 BEGIN {
   if(defined &DEBUG) {;} # Okay
index 4592c32..d75ba68 100644 (file)
@@ -5,7 +5,7 @@ require 5;
 package Pod::Simple::TranscodeDumb;
 use strict;
 use vars qw($VERSION %Supported);
-$VERSION = '3.17';
+$VERSION = '3.18';
 # This module basically pretends it knows how to transcode, except
 #  only for null-transcodings!  We use this when Encode isn't
 #  available.
index c16cbfe..a97df58 100644 (file)
@@ -9,7 +9,7 @@ use strict;
 use Pod::Simple;
 require Encode;
 use vars qw($VERSION );
-$VERSION = '3.17';
+$VERSION = '3.18';
 
 sub is_dumb  {0}
 sub is_smart {1}
index 21e3318..f528a77 100644 (file)
@@ -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.17';
+$VERSION = '3.18';
 use Pod::Simple::Methody ();
 @ISA = ('Pod::Simple::Methody');
 
index 00d71b6..4326ec4 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use Carp ();
 use Pod::Simple ();
 use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS);
-$VERSION = '3.17';
+$VERSION = '3.18';
 BEGIN {
   @ISA = ('Pod::Simple');
   *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG;
index b9b67a2..fa744e4 100644 (file)
@@ -76,6 +76,9 @@ if( $testmod ) {
   my @x = ($x->find($testmod)||'(nil)', $testpath);
   print "# Comparing \"$x[0]\" to \"$x[1]\"\n";
   for(@x) { s{[/\\]}{/}g; }
+  # If it finds a .pod, it's probably correct, as that's where the docs are.
+  # Change it to .pm so that it matches.
+  $x[0] =~ s{[.]pod$}{.pm} if $x[1] =~ m{[.]pm$};
   print "#        => \"$x[0]\" to \"$x[1]\"\n";
   ok
        lc $x[0], 
index d7c5148..ff141fd 100644 (file)
@@ -311,7 +311,7 @@ The B<-v> option now fetches the right section for C<$0>.
 
 =item *
 
-L<Pod::Simple> has been upgraded from version 3.16 to version 3.17
+L<Pod::Simple> has been upgraded from version 3.16 to version 3.18
 
 =item *