Copyright (C) 2000-2012 |
Manpages Apache::FakeRequestSection: User Contributed Perl Documentation (3)Updated: 2000-03-21 Index Return to Main Contents NAMEApache::FakeRequest - fake request object for debuggingSYNOPSISuse Apache::FakeRequest; my $request = Apache::FakeRequest->new(method_name => 'value', ...); DESCRIPTIONApache::FakeRequest is used to set up an empty Apache request object that can be used for debugging. The Apache::FakeRequest methods just set internal variables of the same name as the method and return the value of the internal variables. Initial values for methods can be specified when the object is created. The print method prints to STDOUT.Subroutines for Apache constants are also defined so that using Apache::Constants while debugging works, although the values of the constants are hard-coded rather than extracted from the Apache source code.
#!/usr/bin/perl use Apache::FakeRequest (); use mymodule (); my $request = Apache::FakeRequest->new('get_remote_host'=>'foobar.com'); mymodule::handler($request); AUTHORSDoug MacEachern, with contributions from Andrew Ford <A.Ford@ford-mason.co.uk>.
IndexThis document was created by man2html, using the manual pages. Time: 07:33:00 GMT, March 29, 2024 |