Fix parse problem with embedded typemaps
authorSteffen Mueller <smueller@cpan.org>
Fri, 20 Jan 2012 19:08:55 +0000 (20:08 +0100)
committerSteffen Mueller <smueller@cpan.org>
Fri, 20 Jan 2012 19:15:57 +0000 (20:15 +0100)
If an embedded typemap was found in certain locations, we got spurious
parse failures. Mea culpa.

dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm

index 07d5909..6a314f8 100644 (file)
@@ -11,7 +11,7 @@ use Symbol;
 
 our $VERSION;
 BEGIN {
-  $VERSION = '3.12';
+  $VERSION = '3.13';
 }
 use ExtUtils::ParseXS::Constants $VERSION;
 use ExtUtils::ParseXS::CountLines $VERSION;
@@ -1727,8 +1727,7 @@ sub fetch_para {
       );
       $self->{typemap}->merge(typemap => $tmap, replace => 1);
 
-      last unless defined($self->{lastline} = readline($self->{FH}));
-      next;
+      $self->{lastline} = "";
     }
 
     if ($self->{lastline} !~ /^\s*#/ ||
index 403a0a8..5d62af7 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use Symbol;
 
-our $VERSION = '3.12';
+our $VERSION = '3.13';
 
 =head1 NAME
 
index 3934718..da14606 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::ParseXS::CountLines;
 use strict;
 
-our $VERSION = '3.12';
+our $VERSION = '3.13';
 
 our $SECTION_END_MARKER;
 
index 6e3fb95..3851092 100644 (file)
@@ -6,7 +6,7 @@ use File::Spec;
 use lib qw( lib );
 use ExtUtils::ParseXS::Constants ();
 
-our $VERSION = '3.12';
+our $VERSION = '3.13';
 
 our (@ISA, @EXPORT_OK);
 @ISA = qw(Exporter);