Geoffrey Young wrote:
Michael Peters wrote:
Hello all,
I have a module that can be run either under mod_perl 1 and 2. This
works great when running and testing using Apache-Test, but the bit I'm
having problems with is the install.
For it to run properly it needs either Apache::Constants or
Apache2::Const. This is easy enough to figure out which one to pick at
run time (or compile time) but I can't figure out a good way to do this
at build time using either M::B or EU::MM so that the appropriate
prerequs are followed or at least complained about.
see some of stas' modules on cpan - Apache::Peek comes to mind. IIRC
they support both mp1 and mp2 and have some kind of dynamic build-time
checking code in Makefile.PL
Thanks, I'll look into those.
as a community we really ought to figure out the "right" way to do this
and abstract it into something everyone can just cut-and-paste. or,
better, include it as a package in both mp1 and mp2.
I think the "best" way might be to look to Apache::Test. Figuring out
which one to use at run time is easy and well documented but the
install/testing time is the tricky bit. I don't know if it's currently
available, but is there a way to query Apache::Test to find out which
version of mod_perl it will run against (since A::T figures this out
when it's installed right)?
--
Michael Peters
Developer
Plus Three, LP