NAME

Bric::App::Handler - The center of the application, as far as Apache is concerned.

VERSION

$Revision: 1.18.2.1 $

DATE

$Date: 2002/09/13 21:19:19 $

SYNOPSIS

<Perl>
use lib '/usr/local/bricolage/lib';
</Perl>
PerlModule Bric::App::Handler
PerlFreshRestart    On
DocumentRoot "/usr/local/bricolage/comp"
<Directory "/usr/local/bricolage/comp">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    SetHandler perl-script
    PerlAccessHandler Bric::App::AccessHandler
    PerlHandler Bric::App::Handler
    PerlCleanupHandler Bric::App::CleanupHandler
</Directory>

DESCRIPTION

This package is the main package used by Apache for managing the Bricolage application. It loads all the necessary Mason and Bricolage libraries and sets everything up for use in Apache. It is one function is handler(), which is called by mod_perl for every request.

INTERFACE

Constructors

NONE.

Destructors

NONE.

Public Class Methods

NONE.

Public Functions

my $status = handler()

Handles the apache request.

Throws: None - the buck stops here!

Side Effects: NONE.

Notes: NONE.

$status = handle_err($r, $@)
$status = handle_err($r, $@) if $@;

Handles errors when they're thrown by a main handler. Logs the error to the Apache error log and formats the error screen for the browser.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

my $args = load_args($ah, $rref, $m)

Overrides the HTML::Mason::ApacheHandler::ARGS_METHOD method to process GET and POST data. By overriding it, we are able to do a couple of extra things, such as translate the characters to Unicode and to turn empty strings into undefs.

Throws:

Side Effects: NONE.

Notes: Most of this code was copied from HTML::Mason::ApacheRequest::_mod_perl_args(). We will have to change the Mason settings for triggering this in future versions of Mason, where Jonathan promises,

In the long term (1.2-ish), we are planning to split out
ApacheHandler::handle_request into several API functions, one of which will
be "determine the hash of args from $r". So you will be able to do your own
thing instead of calling the standard ApacheHandler method for this.

One thing that is commented out here is callbacks. I have not been able to get them to work properly here yet, so they remain in /autohandler. But they are the Only thing left there!

filter($output)

This function translates data going out from Mason from Unicode into the users preferred character set.

Throws:

Side Effects: NONE.

Notes: NONE.

PRIVATE

Private Class Methods

NONE.

Private Instance Methods

NONE.

Private Functions

NONE.

NOTES

NONE.

AUTHOR

David Wheeler <david@wheeler.net>

SEE ALSO

Bric