httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Makefile.PL Questions
Date Mon, 30 Jun 2003 18:26:07 GMT

> I can avoid this by checking to see if Apache::Test loads and only using 
> it if it does. But then, how would I set up the tests to run after 
> CPAN.pm has installed Apache::Test? Does it run Makefile.PL again?

I don't ever use CPAN.pm, so I don't know if the way I have been going about 
it actually works or not, but my standard 1.0 Makefile.PL (which was linked 
to in the perl.com article) looks something like

sub MY::test {
   eval {
     require Apache::Test;
     require Apache::TestMM;
     require Apache::TestRunPerl;

     Apache::TestMM->import(qw(test clean));
     Apache::TestMM::filter_args();

     Apache::TestRunPerl->generate_script();

     return Apache::TestMM->test;
   }

   or return <<EOF;
test::
\t\@echo This test suite requires Apache-Test,
\t\@echo which is available from the mod_perl 2.0
\t\@echo sources, CPAN, or the httpd-test distribution.
EOF
}

this makes 'make test' echo the error string or run the tests, depending on 
whether A::T is installed.  in either case, 'make test' is successful (I hope :)

HTH

--Geoff


Mime
View raw message