#
################################################################################
#
-# $Revision: 33 $
+# $Revision: 36 $
# $Author: mhx $
-# $Date: 2005/01/31 08:10:55 +0100 $
+# $Date: 2005/06/25 17:56:28 +0200 $
#
################################################################################
#
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*?)^/
{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;
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 {
#
################################################################################
#
-# $Revision: 33 $
+# $Revision: 36 $
# $Author: mhx $
-# $Date: 2005/01/31 08:10:55 +0100 $
+# $Date: 2005/06/25 17:56:28 +0200 $
#
################################################################################
#
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.
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
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;
$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;
/*
----------------------------------------------------------------------
- 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