Geoffrey Young wrote:

Torsten Foertsch wrote:
Hi,

I am a bit confused about what MakeMaker is best to use with mp2 modules. There is the good old ExtUtils::MakeMaker that is mentioned in http://perl.apache.org/docs/general/testing/testing.html. How I got there I don't remember but I have used in all my modules ModPerl::MM. Is that right? Or should I rather port them to use the former?

ModPerl::MM is the way to go. I suspect you can get away with ExtUtils::MakeMaker as log as you're not using XS, but I honestly can't recall what additional magic ModPerl::MM adds. it could be substantial :)

Yes, unless you are using C/XS code that uses Apache/APR/mod_perl APIs, it
doesn't matter. Under the hood, it basically makes sure to propagate the
right values thru to MakeMaker:

    CCFLAGS
    LIBS
    INC
    OPTIMIZE
    LDDLFLAGS
    TYPEMAPS
    OTHERLDFLAGS

I am asking because I have had FAIL reports from CPAN testers that don't install ModPerl::MM.

You mean people who install mod_perl 2 and *not* ModPerl::MM ?? Otherwise,
I would think breaking out on the presence of mod_perl2.pm is good enough, no?

The way around these reports is using

BEGIN {
  eval {
    require ModPerl::MM;
    require Apache::TestMM;
  };
  if( $@ ) {
    warn $@;
    exit 0;
  }
  Apache::TestMM->import( qw(test clean) );
}

instead of

use ModPerl::MM ();
use Apache::TestMM qw(test clean);

This way no Makefile is written and the automatic test suite is happy.

yeah, that's the way you'll need to do it... if you care about those reports :)

you can probably assume that if the user has ModPerl::MM that Apache-Test is available.

Wouldn't that be a bogus assumption? Better off to assume mod_perl2.pm means
ModPerl::MM is installed.

--
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to