Hub::Apache2::Handler - Apache2 mod_perl response handler base class


hub-standard documentation  | view source Contained in the hub-standard distribution.

Index


NAME

Top

Hub::Apache2::Handler - Apache2 mod_perl response handler base class

SYNOPSIS

Top



  sub handler {
  }

  sub process_request {
    my $r = shift;
    ...
    return Apach2::Const::OK;
  }







DESCRIPTION

Top

The working directory of the web site must be set. We will change to and run in this directory. This is also the reflected directory which limits the request's scope.

This base class parses the request's headers, cgi parameters, and initiales the user's session (if it can).

WORKING_DIR

The working directory is just that. Since multiple threads (hence multiple sites) share this interpreter, a change to this directy is issued on each request.

      PerlSetEnv WORKING_DIR "/var/www/html"

CONF_FILE

By default configuration is read from a file named .conf in your working directory. To use a different one, specify it here. It must reside beneath your working directory, and this path is relative to the working directory. For example:

      PerlSetEnv CONF_FILE "/conf/custom.conf"

would resolve to:

      $WORKING_DIR/conf/custom.conf

DEBUG

To generate debug messages (written to stderr), set this to a true value.

      # Basic debugging
      PerlSetEnv DEBUG 1

      # More debugging info (includes stack traces)
      PerlSetEnv DEBUG 2







PUBLIC METHODS

Top

handle_apache_request

Apache2 mod_perl invokation wrapper

response_handler_callback

Environment wrapper for response handlers


 Usage: response_handler_callback \&subroutine, $r




INTERNAL METHODS

Top

_handle_request

Worker method

_sigwarn

Warning handler

_sigdie

Die handler (fatals to browser)

AUTHOR

Top

Ryan Gies (ryangies@livesite.net)

COPYRIGHT

Top

UPDATED

Top

08/02/2007


hub-standard documentation  | view source Contained in the hub-standard distribution.