The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache2::Controller::NonResponseBase - internal base class for non-response handlers in Apache2::Controller framework

VERSION

Version 1.001.001

SYNOPSIS

This is an INTERNAL base class and you don't need to use it.

 package Apache2::Controller;
 use base Apache2::Controller::NonResponseBase;

 # no need to define handler() or new()
 
 1;

DESCRIPTION

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.

METHODS

handler

handler() takes the request, creates an object using the child class name, runs the process() method, and handles errors.

new

new() creates an object of the child class and assigns the Apache2::RequestRec object to $self->{r}.

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 $self->{r}.

SEE ALSO

Apache2::Controller::NonResponseRequest

Apache2::Controller::Dispatch

Apache2::Controller::Session

Apache2::Controller

AUTHOR

Mark Hedges, <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.