Cheers Mark, Yeah I've proof of concepted the Plack::App::FakeApache stuff which works well for the bits of the program that are not too badly frankensteined. But now I have to go back and saw off and replace the bits that won't work under P::A::FA (hence the static/stack trace analysis tool I wrote) - identify the bad bits so that they will run under P::A::FA.
On Sat, Sep 20, 2014 at 1:21 AM, Mark Fowler <m...@twoshortplanks.com> wrote: > 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. > >