>From: Tim Bunce <Tim.Bunce@ig.co.uk>
>> This also changes the default version number in the templates from 0.1 to
>> 0.01. Better than that, it adds the -v option so the default value can be
>> overridden.
>
>Thanks, but I still don't see '$VERSION = ...;' being written into the .pm file.
I have added $VERSION to the PM, and also listed it in the bootstrap arg
list. I have removed the changelog stuff from the PM's POD template,
because a manpage is not a changelog.
Apply this over the 1.11 patch.
We need to get MM to set the PM's version number, folks. Right now MM
doesn't help us at all unless the extension uses two or more XS files, and
that's a rare occasion.
Dean
*** h2xs.PL-1.11 Fri Dec 29 12:55:37 1995
--- h2xs.PL Fri Dec 29 12:54:23 1995
***************
*** 149,155 ****
=cut
! my $H2XS_VERSION = 1.11;
my $TEMPLATE_VERSION = '0.01';
use Getopt::Std;
--- 149,155 ----
=cut
! my( $H2XS_VERSION ) = '$Revision: 1.12 $' =~ /\$Revision:\s+([^\s]+)/;
my $TEMPLATE_VERSION = '0.01';
use Getopt::Std;
***************
*** 286,291 ****
--- 286,293 ----
\@EXPORT = qw(
@const_names
);
+ \$VERSION = '$TEMPLATE_VERSION';
+
END
print PM <<"END" unless $opt_c;
***************
*** 314,320 ****
END
print PM <<"END";
! bootstrap $module;
# Preloaded methods go here.
--- 316,322 ----
END
print PM <<"END";
! bootstrap $module \$VERSION;
# Preloaded methods go here.
***************
*** 351,362 ****
#
#$author, $email
#
- #=head1 MODIFICATION HISTORY
- #
- #=head2 $TEMPLATE_VERSION
- #
- #Initial release.
- #
#=head1 SEE ALSO
#
#perl(1).
--- 353,358 ----
***************
*** 485,491 ****
END
print PL "WriteMakefile(\n";
print PL " 'NAME' => '$module',\n";
! print PL " 'VERSION' => '".$TEMPLATE_VERSION."',\n";
print PL " 'LIBS' => ['$extralibs'], # e.g., '-lm' \n";
print PL " 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' \n";
print PL " 'INC' => '', # e.g., '-I/usr/include/other' \n";
--- 481,487 ----
END
print PL "WriteMakefile(\n";
print PL " 'NAME' => '$module',\n";
! print PL " 'VERSION' => '$TEMPLATE_VERSION',\n";
print PL " 'LIBS' => ['$extralibs'], # e.g., '-lm' \n";
print PL " 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' \n";
print PL " 'INC' => '', # e.g., '-I/usr/include/other' \n";
>> This also changes the default version number in the templates from 0.1 to
>> 0.01. Better than that, it adds the -v option so the default value can be
>> overridden.
>
>Thanks, but I still don't see '$VERSION = ...;' being written into the .pm file.
I have added $VERSION to the PM, and also listed it in the bootstrap arg
list. I have removed the changelog stuff from the PM's POD template,
because a manpage is not a changelog.
Apply this over the 1.11 patch.
We need to get MM to set the PM's version number, folks. Right now MM
doesn't help us at all unless the extension uses two or more XS files, and
that's a rare occasion.
Dean
*** h2xs.PL-1.11 Fri Dec 29 12:55:37 1995
--- h2xs.PL Fri Dec 29 12:54:23 1995
***************
*** 149,155 ****
=cut
! my $H2XS_VERSION = 1.11;
my $TEMPLATE_VERSION = '0.01';
use Getopt::Std;
--- 149,155 ----
=cut
! my( $H2XS_VERSION ) = '$Revision: 1.12 $' =~ /\$Revision:\s+([^\s]+)/;
my $TEMPLATE_VERSION = '0.01';
use Getopt::Std;
***************
*** 286,291 ****
--- 286,293 ----
\@EXPORT = qw(
@const_names
);
+ \$VERSION = '$TEMPLATE_VERSION';
+
END
print PM <<"END" unless $opt_c;
***************
*** 314,320 ****
END
print PM <<"END";
! bootstrap $module;
# Preloaded methods go here.
--- 316,322 ----
END
print PM <<"END";
! bootstrap $module \$VERSION;
# Preloaded methods go here.
***************
*** 351,362 ****
#
#$author, $email
#
- #=head1 MODIFICATION HISTORY
- #
- #=head2 $TEMPLATE_VERSION
- #
- #Initial release.
- #
#=head1 SEE ALSO
#
#perl(1).
--- 353,358 ----
***************
*** 485,491 ****
END
print PL "WriteMakefile(\n";
print PL " 'NAME' => '$module',\n";
! print PL " 'VERSION' => '".$TEMPLATE_VERSION."',\n";
print PL " 'LIBS' => ['$extralibs'], # e.g., '-lm' \n";
print PL " 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' \n";
print PL " 'INC' => '', # e.g., '-I/usr/include/other' \n";
--- 481,487 ----
END
print PL "WriteMakefile(\n";
print PL " 'NAME' => '$module',\n";
! print PL " 'VERSION' => '$TEMPLATE_VERSION',\n";
print PL " 'LIBS' => ['$extralibs'], # e.g., '-lm' \n";
print PL " 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' \n";
print PL " 'INC' => '', # e.g., '-I/usr/include/other' \n";