Why not adopt me?
NAME
Mock::Apache - mock Apache environment for testing and debugging
SYNOPSIS
use Mock::Apache;
my $server = Mock::Apache->setup_server(param => 'value', ...);
my $request = $server->new_request(method_name => 'value', ...);
$server->
DESCRIPTION
Mock::Apache
is a mock framework for testing and debugging mod_perl 1.x applications. Although that verson of mod_perl is obsolete, there is still a lot of legacy code that uses it. The framework is intended to assist in understanding such code, by enabling it to be run and debugged outside of the web server environment. The framework provides a tracing facility that prints all methods called, optionally with caller information.
Mock::Apache
is based on Apache::FakeRequest
but goes beyond that module, attempting to provide a relatively comprehensive mocking of the mod_perl environment.
NOTE: the module is still very much at an alpha stage, with much of the Apache::* classes missing, and much of the emulation incomplete or probably just wrong.
I am aiming to provide top-level methods to "process a request", by giving the mock apache object enough information about the configuration to identify handlers, etc. Perhaps passing the server_setup method the pathname of an Apache configuration file even and minimally "parsing" it.
METHODS
setup_server
new_request
execute_handler
localizes elements of the %ENV hash
SEE ALSO
https://github.com/fordmason/Mock-Apache
mod_perl Pocket Reference by Andrew Ford, O'Reilly & Associates, Inc, Sebastapol, 2001, ISBN: 0-596-00047-2
AUTHORS
Andrew Ford <andrew@ford-mason.co.uk>
Based on Apache::FakeRequest
by Doug MacEachern, with contributions from Andrew Ford <andrew@ford-mason.co.uk>.