Author: dagolden
Date: Mon Aug 31 05:22:33 2009
New Revision: 13239
Modified:
Module-Build/trunk/Changes
Module-Build/trunk/lib/Module/Build/Compat.pm
Module-Build/trunk/t/compat.t
Log:
Deprecate 'passthrough' Makefile.PL and warn on usage
Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes (original)
+++ Module-Build/trunk/Changes Mon Aug 31 05:22:33 2009
@@ -21,6 +21,9 @@
Other:
- Added t/README.pod and t/sample.t to guide developers writing new tests
[David Golden, with some code from Eric Wilhelm]
+ - Module::Build::Compat 'passthrough' style has been deprecated. Using
+ 'passthrough' will issue warnings on Makefile.PL generation. See
+ Module::Build::Compat documentation for rationale.
0.35 - Thu Aug 27 09:12:02 EDT 2009
Modified: Module-Build/trunk/lib/Module/Build/Compat.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Compat.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Compat.pm Mon Aug 31 05:22:33 2009
@@ -71,6 +71,17 @@
die "Don't know how to build Makefile.PL of type '$type'"
unless $type =~ /^(small|passthrough|traditional)$/;
+ if ($type eq 'passthrough') {
+ $build->log_info(<<"HERE");
+
+IMPORTANT NOTE: The '$type' style of Makefile.PL is deprecated and
+may be removed in a future version of Module::Build in favor of the
+'configure_requires' property. See Module::Build::Compat
+documentation for details.
+
+HERE
+ }
+
my $fh;
if ($args{fh}) {
$fh = $args{fh};
@@ -414,7 +425,7 @@
my $build = Module::Build->new
( module_name => 'Foo::Bar',
license => 'perl',
- create_makefile_pl => 'passthrough' );
+ create_makefile_pl => 'traditional' );
...
@@ -448,6 +459,18 @@
=over 4
+=item traditional
+
+A F<Makefile.PL> will be created in the "traditional" style, i.e. it will
+use C<ExtUtils::MakeMaker> and won't rely on C<Module::Build> at all.
+In order to create the F<Makefile.PL>, we'll include the C<requires> and
+C<build_requires> dependencies as the C<PREREQ_PM> parameter.
+
+You don't want to use this style if during the C<perl Build.PL> stage
+you ask the user questions, or do some auto-sensing about the user's
+environment, or if you subclass C<Module::Build> to do some
+customization, because the vanilla F<Makefile.PL> won't do any of that.
+
=item small
A small F<Makefile.PL> will be created that passes all functionality
@@ -455,24 +478,22 @@
already have C<Module::Build> installed in order to use this, or else
they'll get a module-not-found error.
-=item passthrough
+=item passthrough (DEPRECATED)
This is just like the C<small> option above, but if C<Module::Build> is
not already installed on the user's system, the script will offer to
use C<CPAN.pm> to download it and install it before continuing with
the build.
-=item traditional
-
-A F<Makefile.PL> will be created in the "traditional" style, i.e. it will
-use C<ExtUtils::MakeMaker> and won't rely on C<Module::Build> at all.
-In order to create the F<Makefile.PL>, we'll include the C<requires> and
-C<build_requires> dependencies as the C<PREREQ_PM> parameter.
-
-You don't want to use this style if during the C<perl Build.PL> stage
-you ask the user questions, or do some auto-sensing about the user's
-environment, or if you subclass C<Module::Build> to do some
-customization, because the vanilla F<Makefile.PL> won't do any of that.
+This option has been deprecated and may be removed in a future version
+of Module::Build. Modern CPAN.pm and CPANPLUS will recognize the
+C<configure_requires> metadata property and install Module::Build before
+running Build.PL if Module::Build is listed and Module::Build now
+adds itself to configure_requires by default.
+
+Perl 5.10.1 includes C<configure_requires> support. In the future, when
+C<configure_requires> support is deemed sufficiently widespread, the
+C<passthrough> style will be removed.
=back
Modified: Module-Build/trunk/t/compat.t
==============================================================================
--- Module-Build/trunk/t/compat.t (original)
+++ Module-Build/trunk/t/compat.t Mon Aug 31 05:22:33 2009
@@ -477,7 +477,8 @@
}
sub create_makefile_pl {
- Module::Build::Compat->create_makefile_pl(@_);
+ my @args = @_;
+ stdout_of( sub { Module::Build::Compat->create_makefile_pl(@args) } );
my $ok = ok -e 'Makefile.PL', "$_[0] Makefile.PL created";
# Some really conservative make's, like HP/UX, assume files with the same