Skip Menu |

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

Report information
The Basics
Id: 18322
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: matt.lawrence [...] virgin.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.2611
Fixed in: (no value)



Subject: static subclasses not loaded by Compat
If I create a Module::Build subclass in my filesystem and use it in Build.PL with create_makefile_pl => 'passthrough', the generated Makefile.PL file can't load the subclass. It seems the modifications made to @INC in Build.PL get propagated to Build, but not to Makefile.PL I've attached a minimal test case for this. I'm seeing: $ perl Makefile.PL # running Build.PL /usr/bin/perl5.8.6 -I_build/lib Build.PL Checking whether your kit is complete... Looks good Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'MyModule' version '1.00' Can't locate MyModule/Build.pm in @INC (@INC contains: _build/lib [...] .) at Makefile.PL line 30.
Subject: Module-Build-test.tar.gz
Download Module-Build-test.tar.gz
application/x-gzip 1.4k

Message body not shown because it is not plain text.

Hi Matt, I just tested this with Module::Build 0.28, and it behaves correctly. Below is the Makefile.PL that would be generated by 0.28 during 'do_create_makefile_pl'. So you could install 0.28 on your system and re-release your distribution and that should fix the problem. -Ken # Note: this file was auto-generated by Module::Build::Compat version 0.03 unless (eval "use Module::Build::Compat 0.02; 1" ) { print "This module requires Module::Build to install itself.\n"; require ExtUtils::MakeMaker; my $yn = ExtUtils::MakeMaker::prompt (' Install Module::Build now from CPAN?', 'y'); unless ($yn =~ /^y/i) { die " *** Cannot install without Module::Build. Exiting ...\n"; } require Cwd; require File::Spec; require CPAN; # Save this 'cause CPAN will chdir all over the place. my $cwd = Cwd::cwd(); CPAN::Shell->install('Module::Build::Compat'); CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate or die "Couldn't install Module::Build, giving up.\n"; chdir $cwd or die "Cannot chdir() back to $cwd: $!"; } eval "use Module::Build::Compat 0.02; 1" or die $@; use lib 'build_lib'; Module::Build::Compat->run_build_pl(args => \@ARGV); require MyModule::Build; Module::Build::Compat->write_makefile(build_class => 'MyModule::Build');