You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Bart Schaefer <ba...@gmail.com> on 2007/10/22 00:19:09 UTC

"make test" and Apache2 modules

I'm porting an Apache 1.3/mod_perl application to Apache2/mod_perl2.
I've got everything working in that Apache2::porting doesn't complain
and the application behaves as expected if I force an install, but
"make test" fails with

Can't locate object method "request" via package "Apache2::RequestUtil" at ...

I'm guessing this is because the XS autoloader is failing for some
reason.  What do I need to be doing so that Apache2 modules can be
properly evaluated outside of an actual running httpd/mod_perl
environment?

Re: "make test" and Apache2 modules

Posted by Bart Schaefer <ba...@gmail.com>.
Apologies for the self-follow-up.

On 10/21/07, Bart Schaefer <ba...@gmail.com> wrote:
> I'm porting an Apache 1.3/mod_perl application to Apache2/mod_perl2.
> "make test" fails with
>
> Can't locate object method "request" via package "Apache2::RequestUtil" at ...

I discovered that I'd missed a case where the app was using an unusual
check for whether it was (not) running in a mod_perl environment.
Once I fixed that to correctly check for (the absence of) mod_perl2,
the code in "make test" stopped referencing
Apache2::RequestUtil->request, and all tests now pass.

I'm still curious whether there is another (better) way to write those tests.