- INITIALIZATION ITEMS
- SEE ALSO
- COPYRIGHT & LICENSE
PerChildInit handler for child process setup in A2C.
<VirtualHost 127.238.349.450:80> PerlLoadModule Apache2::Controller::PerChildInit PerChildInitHandler Apache2::Controller::PerChildInit <Location /a2c_somewhere> # normal Apache2::Controller::Dispatch setup </Location> </VirtualHost>
This is a SERVER init handler that runs once when an Apache2 child process is spawned.
These are the items initialized once per Apache2 child when the
This factors out the common parts of handlers in the
Apache2::Controller framework other than the main response handler. These non-response handlers like Dispatch and Session do not need to create the Apache2::Request object (I think...), so that is put off until the Response phase.
You should not use this module for anything that you're doing.
Pre-response phase handlers do not handle errors in the same way that Apache2::Controller does. If you get an error in a pre-response phase, A2C cannot call your render class error() method, because that stuff is not set up yet. Instead, it spits the error to the error log, logs the reason for the response code, and returns the response code. This should get Apache to quit processing the chain of handlers... we'll see.
handler() takes the request, creates an object using the child class name, runs the process() method, and handles errors.
new() creates an object of the child class and assigns the
Apache2::RequestRec object to
If the parent class defines a method
init(), this will be called at the end of object creation.
Unlike Apache2::Controller, the handler object of other handlers that use this package as a base do not create, delegate to and subclass the Apache2::Request object. They just keep the original Apache2::RequestRec object in
<hedges at formdata.biz>
COPYRIGHT & LICENSE
Copyright 2008-2010 Mark Hedges, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This software is provided as-is, with no warranty and no guarantee of fitness for any particular purpose.