perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Q: Build.PL/Makefile.PL, and CPAN testers...
Date Wed, 26 Sep 2007 19:23:27 GMT


Fred Moyer wrote:
> Graham TerMarsch wrote:
>> 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.
> 
> I can't speak too well to the Module::Build problems, but I learned a
> great deal from following Geoff's lead on some of his modules.  Take a
> look at:
> 
> http://search.cpan.org/src/GEOFF/WebService-CaptchasDotNet-0.06/Makefile.PL
> 
> for a good example of how to handle whether or not Apache::Test is
> present.  If Apache::Test isn't present, then the tests don't run, which
> is what you want.  The philosophy there is that you can still install
> the module if you don't have the dependencies required for the test,
> which is an issue sometimes (production environments for example).
> 
> Geoff can speak to this problem a lot better than I can, everything I
> know about this stuff I owe him for responding to my pestering when I
> was making Apache::Dispatch mp2 compatible.

sorry, I got a private copy of this email and responded to that instead
of on list :)

in the end, what graham seemed to want was a variant of this:

  http://search.cpan.org/src/GEOFF/Apache-Clean-0.05/Makefile.PL

which simply skips over the test phase if $testing_infrastructure_module
isn't available.  in this example I want Apache::Test, but I've also
used it to scan for $version of Test::Builder or whatever.  outside of
test infrastructure modules, you can/ought to handle other dependencies
in the test files themselves.

graham's module has the additional overhead of using ModPerl::MM to make
the basic WriteMakfile() call, for which he has a solution I'll let him
share :)  but most modules don't suffer from that.

--Geoff

Mime
View raw message