For all fans of zombie web application frameworks.

Mark Fowler mark at twoshortplanks.com
Fri Sep 19 16:21:56 BST 2014


Hi Kieren,

(removed sydney-pm to avoid cross posting problems)

First up there's a couple of solutions on the CPAN that you might want to
take a look at to see if they're helpful:

https://metacpan.org/pod/Plack::App::FakeApache (which I've used)
https://metacpan.org/pod/APR::Emulate::PSGI (which I haven't)

If neither of these are wonderful solutions then the other option that I
might consider instead of subclassing Apache2::Request is that you mock the
entire thing yourself (i.e. write a class from scratch that has the same
interface.)  If necessary you could even call this Apache2::Request and
make sure it's loaded instead of the real Apache2::Request (either by
calling it Apache2/Request.pm and putting it somewhere in @INC before the
real one, or by putting the code at the bottom of another module you ensure
you load before Apache2::Request is loaded.

HTH.

Mark.


More information about the london.pm mailing list