Graham TerMarsch wrote: > [crosspost from the mod_perl mailing list, at recommendation of others on the > MP list] > > Wanted to ping the list about something that's irked me the last few days... > > After recently releasing Apache2::Filter::Minifier::JavaScript/CSS, I saw > several failed CPAN testers reports, generally due to the tester not having > the required modules on their machine. > > Now, admittedly these are likely -automated- tests running -unattended-, but > a > failure is still a failure, and I'd like to get it fixed up and passing on as > many machines as possible. > > So... to accommodate those who didn't have Module::Build installed, I set up > a > basic Makefile.PL, following the general guidelines from Apache::Test. > Unfortunately, most testers borked this one too as if they don't have > Apache::Test installed they can't even fire up the Makefile.PL. Doh!
This isn't really your fault, Graham. And you shouldn't have to go through such contortions. Let's look at the error from CPANPLUS. [ERROR] [Tue Sep 25 21:28:16 2007] This module requires 'Module::Build' and 'CPANPLUS::Dist::Build' to be installed, but you don't have it! Will fall back to 'CPANPLUS::Dist::MM', but might not be able to install! [MSG] [Tue Sep 25 21:28:16 2007] No 'Makefile.PL' found - attempting to generate one IMO CPANPLUS is doing the wrong thing. It knows what's wrong (the module needs Module::Build to install, but the user doesn't have it) and it has the ability to fix it (install Module::Build) but it instead tries to generate it's own Makefile.PL which is highly unlikely to work. The solution is that CPANPLUS should install the module's dependency, Module::Build, and then continue on with the installation. It's the whole point of having an automated installer. I believe CPAN.pm gets this right. if (-f "Build.PL" && ! -f "Makefile.PL" && ! exists $req->{"Module::Build"} && ! $CPAN::META->has_inst("Module::Build")) { $CPAN::Frontend->mywarn(" Warning: CPAN.pm discovered Module::Build as ". "undeclared prerequisite.\n". " Adding it now as such.\n" ); $CPAN::Frontend->mysleep(5); $req->{"Module::Build"} = 0; delete $self->{writemakefile}; } -- Robrt: People can't win Schwern: No, but they can riot after the game.