This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics

Nobody in particular
csjewell [...]

Broken in:
Fixed in:
(no value)


Subject: Feature Request: A Module::Build::Compat option that's still 'small', but allows use of the bundled Module::Build.
Here's a current file created with the 'small' option of Module::Build::Compat. # Note: this file was auto-generated by Module::Build::Compat version 0.3601 require 5.008001; use Module::Build::Compat 0.02; Module::Build::Compat->run_build_pl(args => \@ARGV); require Module::Build; Module::Build::Compat->write_makefile(build_class => 'Module::Build'); My thought is that there should also be an option to create a Makefile.PL that looks like this: # Note: this file was auto-generated by Module::Build::Compat version 0.3604 require 5.008001; use inc::latest Module::Build::Compat 0.02; Module::Build::Compat->run_build_pl(args => \@ARGV); use inc::latest Module::Build; Module::Build::Compat->write_makefile(build_class => 'Module::Build'); (of course, it would then require bundling Module::Build when the distribution is created [instead of the current requirement for 'small' that M::B is installed on the end-user's system,] but the assumption is if they used this option, that they are doing so.) If you'd like me to provide a patch that implement this, let me know.
That's a great idea. Patches would be quite welcome. Subversion repository is here: if that's helpful at all. -- David
Patch off\...\Module-Build\trunk attached. Note that this patch makes t\compat.t fail if the MB_TEST_EXPERIMENTAL environment variable is defined. My assumption as to why would be that t\compat.t does not know how to make a bundled environment to test the new 'bundled' Makefile.PL type. Maybe others would like to add that in - but I know that we at least should start thinking about how to test the ability. You may wish to only apply the lib\Module\Build\ portion of the patch because of this at the moment. ('bundled' is what I called the type. You may wish to use a different name. The patch adds the code and documentation to lib\Module\Build\, and starts adding testing code to t\compat.t.)
Subject: bundled-compat-makefile-pl.patch
Index: lib/Module/Build/ =================================================================== --- lib/Module/Build/ (revision 13768) +++ lib/Module/Build/ (working copy) @@ -97,7 +97,7 @@ my ($package, $type, $build, %args) = @_; die "Don't know how to build Makefile.PL of type '$type'" - unless $type =~ /^(small|passthrough|traditional)$/; + unless $type =~ /^(small|passthrough|traditional|bundled)$/; if ($type eq 'passthrough') { $build->log_warn(<<"HERE"); @@ -161,6 +161,15 @@ Module::Build::Compat->write_makefile(build_class => '%s'); EOF + } elsif ($type eq 'bundled') { + printf {$fh} <<'EOF', $subclass_load, ref($build), ref($build); + use inc::latest Module::Build::Compat 0.02; + %s + Module::Build::Compat->run_build_pl(args => \@ARGV); + use inc::latest %s; + Module::Build::Compat->write_makefile(build_class => '%s'); +EOF + } elsif ($type eq 'passthrough') { printf {$fh} <<'EOF', $subclass_load, ref($build), ref($build); @@ -505,6 +514,13 @@ already have C<Module::Build> installed in order to use this, or else they'll get a module-not-found error. +=item bundled (NEW) + +A small F<Makefile.PL> will be created that passes all functionality +through to the F<Build.PL> script in the same directory. The user must +bundle C<Module::Build> with C<inc::latest> in order to use this, or else +they'll get a module-not-found error. + =item passthrough (DEPRECATED) This is just like the C<small> option above, but if C<Module::Build> is Index: t/compat.t =================================================================== --- t/compat.t (revision 13768) +++ t/compat.t (working copy) @@ -13,6 +13,7 @@ delete @ENV{@makefile_keys}; my @makefile_types = qw(small passthrough traditional); +push @makefile_types, 'bundled' if defined $ENV{MB_TEST_EXPERIMENTAL}; my $tests_per_type = 15; #find_in_path does not understand VMS.

This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with to