of interest to people who use
to test their
if you use
to configure your tests (as you should) but the end-user of your module configures
with a non-mod_perl-enabled Apache, the test suite will blow up before it ever starts, due to the presense of mod_perl specific directives (such as
the current CVS version helps to protect you from this by making sure that the default
does not keep your tests from running - the server will now start, leaving it up to you to decide whether your tests pass or fail.
so, now that the server starts but mod_perl isn't guaranteed to be available, here are your options:
- keep the mod_perl-specific direcitves in your
and your test suite keeps blowing up (same as before). if you want to let the test suite (and not your tests) decide whether
fails due to your test environemt
, this is currently your only option. personally, I consider this a bad programming practice; only the tests ought to decide whether
is successful. I know of others that disagree, though.
- if you don't want the server to blow up, protect your
, which will allow the server to start, even if mod_perl isn't available. then
plan tests => $tests, have_module('mod_perl.c');
in each test where mod_perl is required, similar to the way you (should be) using
to skip over tests where mod_cgi is required. or
or some form of
if you want the tests to fail due to an improperly configured test environment.
oh, and for those paying attention, it's
as the latter will return true for mod_perl 1.0 installations where
is present, which probably isn't what you want.