Upgrade to Devel::PPPort 3.06_01
[p5sagit/p5-mst-13.2.git] / ext / Devel / PPPort / PPPort_pm.PL
index e992230..61ac6b2 100644 (file)
@@ -4,9 +4,9 @@
 #
 ################################################################################
 #
-#  $Revision: 33 $
+#  $Revision: 36 $
 #  $Author: mhx $
-#  $Date: 2005/01/31 08:10:55 +0100 $
+#  $Date: 2005/06/25 17:56:28 +0200 $
 #
 ################################################################################
 #
@@ -47,7 +47,7 @@ $data =~ s{^(.*)__PROVIDED_API__(\s*?)^}
   for (keys %explicit) {
     length > $len and $len = length;
   }
-  my $format = sprintf "%%-%ds  %%-%ds  %%-%ds", $len+2, $len+5, $len+12;
+  my $format = sprintf '%%-%ds  %%-%ds  %%s', $len+2, $len+5;
   $len = 3*$len + 23;
 
 $data =~ s/^(.*)__EXPLICIT_API__(\s*?)^/
@@ -125,7 +125,7 @@ $data =~ s{^__UNSUPPORTED_API__(\s*?)^}
           {join "\n", @todo}gem;
 
 $data =~ s{__MIN_PERL__}{5.003}g;
-$data =~ s{__MAX_PERL__}{5.9.2}g;
+$data =~ s{__MAX_PERL__}{5.9.3}g;
 
 open FH, ">PPPort.pm" or die "PPPort.pm: $!\n";
 print FH $data;
@@ -196,7 +196,7 @@ sub expand_undefined
   my($macro, $withargs, $def) = @_;
   my $rv = "#ifndef $macro\n#  define ";
 
-  if (defined $def) {
+  if (defined $def && $def =~ /\S/) {
     $rv .= sprintf "%-30s %s", $withargs, $def;
   }
   else {
@@ -309,9 +309,9 @@ __DATA__
 #
 ################################################################################
 #
-#  $Revision: 33 $
+#  $Revision: 36 $
 #  $Author: mhx $
-#  $Date: 2005/01/31 08:10:55 +0100 $
+#  $Date: 2005/06/25 17:56:28 +0200 $
 #
 ################################################################################
 #
@@ -348,10 +348,10 @@ contains a series of macros and, if explicitly requested, functions that
 allow XS modules to be built using older versions of Perl. Currently,
 Perl versions from __MIN_PERL__ to __MAX_PERL__ are supported.
 
-This module is used by C<h2xs> to write the file F<ppport.h>. 
+This module is used by C<h2xs> to write the file F<ppport.h>.
 
 =head2 Why use ppport.h?
+
 You should use F<ppport.h> in modern code so that your code will work
 with the widest range of Perl interpreters possible, without significant
 additional work.
@@ -370,7 +370,7 @@ They are most probably no XS writers. Also, don't make F<ppport.h>
 optional. Rather, just take the most recent copy of F<ppport.h> that
 you can find (e.g. by generating it with the latest C<Devel::PPPort>
 release from CPAN), copy it into your project, adjust your project to
-use it, and distribute the header along with your module. 
+use it, and distribute the header along with your module.
 
 =head2 Running ppport.h
 
@@ -473,12 +473,13 @@ require DynaLoader;
 use strict;
 use vars qw($VERSION @ISA $data);
 
-$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.06 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.06_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
 
 @ISA = qw(DynaLoader);
 
 bootstrap Devel::PPPort;
 
+sub _init_data
 {
   $data = do { local $/; <DATA> };
   my $now = localtime;
@@ -487,12 +488,13 @@ bootstrap Devel::PPPort;
   $data =~ s/__VERSION__/$VERSION/g;
   $data =~ s/__DATE__/$now/g;
   $data =~ s/__PKG__/$pkg/g;
-  $data =~ s/^POD\s//gm;
+  $data =~ s/^\|>//gm;
 }
 
 sub WriteFile
 {
   my $file = shift || 'ppport.h';
+  defined $data or _init_data();
   my $copy = $data;
   $copy =~ s/\bppport\.h\b/$file/g;
 
@@ -512,21 +514,21 @@ __DATA__
 /*
 ----------------------------------------------------------------------
 
-    ppport.h -- Perl/Pollution/Portability Version __VERSION__ 
-   
+    ppport.h -- Perl/Pollution/Portability Version __VERSION__
+
     Automatically created by __PKG__ running under
     perl __PERL_VERSION__ on __DATE__.
-    
+
     Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
     includes in parts/inc/ instead.
+
     Use 'perldoc ppport.h' to view the documentation below.
 
 ----------------------------------------------------------------------
 
 SKIP
 
-%include ppphdoc { indent => 'POD ' }
+%include ppphdoc { indent => '|>' }
 
 %include ppphbin