water has asked for the wisdom of the Perl Monks concerning the following question:

What's the best way to test methods/subs within an apache mod-perl2 handler *offline* -- that is, not running under mod-perl2? Is Test::MockObject the way to go (passing in a mocked $r object), or is there better test modules for faking Apache2?

Thanks!

water

Replies are listed 'Best First'.
Re: testing modperl2 handler
by perrin (Chancellor) on Feb 16, 2005 at 23:04 UTC
    Test it online, with the Apache::Test framework. There's a nice article about it on perl.com. Offline testing would take a lot of work to fake, and is probably not worth it.
      Thanks for the suggestion. I'm now grappling with a
      waiting 60 seconds for server to start: .Can't locate lib.pm in @INC ( +@INC contains:
      error... not sure how to config the test apache, even after reading the docs
        Better to ask on the mailing list. I haven't seen this error before myself.