You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <gy...@laserlink.net> on 2001/05/10 15:52:55 UTC
more Apache::Test stuff...
hi again...
ok, I've been working on a way to make a proper Makefile.PL that warns at
'make test' if you don't have Apache::Test installed.
it's probably my meager understanding of ExtUtils and make, but this is
all I could find that worked:
eval {
require Apache::TestMM;
Apache::TestMM->import('test');
};
sub MY::test {
package MY;
my $inherited = shift->SUPER::test(@_);
eval {
require Apache::TestMM;
};
return <<EOF if $@;
test:
\@\$(PERL) -e 'print "This test suite requires Apache::Test\\n";' \\
-e 'print "available from the mod_perl 2.0 sources\\n"'
EOF
return $inherited;
}
certainly not elegant, but this way 'make test' warns without Apache::Test
and works properly with it. No matter how hard I tried, I wasn't able to
scope MY::test properly to get away with only one eval(). I think I'm
missing something in the big picture...
anywaym, if anyone has any better suggestions... I imagine that we are going
to have to deal with this at some point anyway and come up with an offical
snippet :)
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: more Apache::Test stuff...
Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 10 May 2001, Geoffrey Young wrote:
> hi again...
>
> ok, I've been working on a way to make a proper Makefile.PL that warns at
> 'make test' if you don't have Apache::Test installed.
>
> it's probably my meager understanding of ExtUtils and make, but this is
> all I could find that worked:
>
> eval {
> require Apache::TestMM;
> Apache::TestMM->import('test');
> };
skip that part.
> sub MY::test {
and change this to something like:
sub MY::test {
return Apache::TestMM->test if eval { require Apache::TestMM };
return <<'EOF';
test:
@echo This test suite requires Apache::Test
@echo available from the mod_perl 2.0 sources
EOF
}
do you have Apache::Test working against 1.xx apache/mod_perl?
i know it works against 1.3 servers, but have not tested that with
mod_perl. if it is working, i can put a version of Apache-Test on cpan.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org