On Wednesday 26 September 2007 2:36 pm, Michael G Schwern wrote: > Graham TerMarsch wrote: > > 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.
Hey, I'm with 'ya on that one... I agree that I shouldn't have to go through such contortions to avoid failures. The Build.PL lists the dependencies for building/installing the package, and I'd like to think that "use Module::Build" gives an implicit dependency on M::B itself. > 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. Again, I'm with 'ya... If CPANPLUS realizes that the modules requires M::B and its not installed, IMO any failures that occur after that should be considered a warning at best but -not- a failure. Heck... CPANPLUS knew that it didn't have M::B installed but proceeded to go ahead with the build/test anyways. Reporting an error on the results is inappropriate at best, never mind being frustrating as the majority of automated test results come from CPANPLUS. > 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. As a dumb alternative... what about explicitly listing M::B as a build dependency? Would that trigger CPANPLUS into installing it and then restarting the build? But I agree.... the point of having an automated installer and build environment is so that it makes sure that you've got dependencies installed before you try to build things. From what I'm seeing, CPANPLUS is horribly lacking in this dept, to laughable extents. ---------------------------------------------------------------------- FYI.... based on some additional feedback from individuals on the modperl mailing list, I've current got a test copy of this locally which: 1. Provides Build.PL, which uses Apache::TestMB if available. Apache::Test is listed as a build pre-requisite, and M::B complains if its not installed. If you choose to continue on with the build/test/install, you're on your own. 2. Provides a Makefile.PL (similar to what's in Apache::Clean 0.05) which tries to test -itself- to see if Apache::Test is available. If it is, it gets used for testing. If its not, it spits out a warning telling you that you're missing bits in your toolchain. 3. Updates -ALL- of the test suites so they now each explicitly check to make sure that Apache::Test is available. If its not, they "skip_all". I did this so that its painfully obvious that there -were- more tests to run but that by virtue of your build environment missing one or more modules, they weren't run. --- I'd considered not doing (3) and having (2) simply ignore -all- tests if you didn't have A::T installed, but instead opted for "point out -repeatedly- that the build environment is borked". Using this test copy, I now get "successful" test runs (for whatever you'd like to think that to mean) in each of the following setups: a) EU::MM, no A::T. Skips all tests b) EU::MM, has A::T. Runs tests successfully c) M::B, no A::T. Skips all tests d) M::B, has A::T. Runs tests successfully In (a) and (c), you're also given warnings from both the build toolchain -and- the test suites to point out that somethings amiss in the build environment. -- Graham TerMarsch Howling Frog Internet Development, Inc.