MAN page from Old RedHat 6.X perl-HTML-Mason-0.8-6.i386.rpm
APACHEHANDLER
Section: User Contributed Perl Documentation (1)
Updated: perl 5.005, patch 03
Index NAME
HTML::Mason::ApacheHandler - Mason/mod_perl interface
SYNOPSIS
my $ah = new HTML::Mason::ApacheHandler (..name/value params..); ... sub handler { my $r = shift; $ah->handle_request($r); } DESCRIPTION
The ApacheHandler object links Mason to Apache, running components inresponse to HTTP requests. It is controlled primarily throughparameters to the
new() constructor.
handle_request() is not a user method, but rather is called from theHTML::Mason::handler() routine in handler.pl.
PARAMETERS TO THE new() CONTRUCTOR
- apache_status_title
- Title that you want this ApacheHandler to appear as underApache::Status. Default is ``HTML::Mason status''. This is useful ifyou create more then one ApacheHandler object and want them allvisible via Apache::Status.
- auto_send_headers
- True or undef; default true. Indicates whether Mason shouldautomatically send HTTP headers before sending content back to theclient. If you set to false, you should call $r->send_http_headermanually.
See the Devel/sending_http_headers of the Component Developer'sGuide for details about the automatic header feature.
- debug_handler_proc, debug_handler_script, debug_mode, debug_perl_binary
- The debug_* parameters control Mason's use of debug files.Component Admin/debugging procedures are fully described in the MasonAdministrator's Guide.
- error_mode
- Specifies one of two ways to handle Perl errors, `fatal' or `html'.In fatal mode the handler simply dies with the error message. Thismay be caught with an eval around $ah->handle_request or leftfor Apache to handle (generally with a return status of 500). InHTML mode the handler sends a readable HTML version of the errormessage to the client. HTML mode is most useful in combination withbatch output mode for debugging.
- output_mode
- This parameter has been replaced by the equivalent Interp parameterInterp/out_mode. For backward compatibility, setting$ah->output_mode will cause $interp->out_mode to be setappropriately.
- top_level_predicate
- Reference to a subroutine that decides whether a component can answertop level requests. This allows for private-use components that livewithin the DocumentRoot but are inaccesible from URLs. By default,always returns 1.
The subroutine receives one parameter, the absolute path to thecomponent. It then returns either a true (serve component) or false(reject component). In this example, the predicate rejects requestsfor components whose name starts with an ``_'' character:
top_level_predicate => sub { $_[0] !~ m{/_[^/]+$}
ACCESSOR METHODS
All of the above properties have standard accessor methods of thesame name: no arguments retrieves the value, and one argument sets it.For example:
my $ah = new HTML::Mason::ApacheHandler; my $errmode = $ah->error_mode; $ah->error_mode('html'); AUTHOR
Jonathan Swartz, swartzAATTtransbay.net
SEE ALSO
HTML::Mason,HTML::Mason::Parser,HTML::Mason::Interp,HTML::Mason::Admin
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- PARAMETERS TO THE new() CONTRUCTOR
- ACCESSOR METHODS
- AUTHOR
- SEE ALSO
This document was created byman2html,using the manual pages.