Mock::Apache - mock Apache environment for testing and debugging
use Mock::Apache; my $server = Mock::Apache->setup_server(param => 'value', ...); my $request = $server->new_request(method_name => 'value', ...); $server->
Mock::Apache is a mock framework for testing and debugging mod_perl 1.x applications. It is based on Apache::FakeRequest but goes beyond that module, attempting to provide a relatively comprehensive mocking of the mod_perl environment.
Mock::Apache
Apache::FakeRequest
The module is still very much at an alpha stage, with much of the Apache::* classes missing.
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.
localizes elements of the %ENV hash
Andrew Ford <andrew@ford-mason.co.uk>
Based on Apache::FakeRequest by Doug MacEachern, with contributions from Andrew Ford <andrew@ford-mason.co.uk>.
To install Mock::Apache, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mock::Apache
CPAN shell
perl -MCPAN -e shell install Mock::Apache
For more information on module installation, please visit the detailed CPAN module installation guide.