.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Gantry::Engine::MP13 3" .TH Gantry::Engine::MP13 3 "2008-01-18" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" Gantry::Engine::MP13 \- mod_perl 1.0 plugin ( or mixin ) .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Gantry::Engine::MP13; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is the binding between the Gantry framework and the mod_perl \s-1API\s0. This particluar module contains the mod_perl 1.0 specific bindings. .PP See mod_perl documentation for a more detailed description for some of these bindings. .SH "METHODS" .IX Header "METHODS" .IP "$self\->apache_param_hash" 4 .IX Item "$self->apache_param_hash" Return a hash reference to the apache request body parameters. .IP "$self\->apache_request" 4 .IX Item "$self->apache_request" Apache::Request is a subclass of the Apache class, which adds methods for parsing \s-1GET\s0 requests and \s-1POST\s0 requests where Content-type is one of application/x\-www\-form\-urlencoded or multipart/form\-data. See the \&\fIlibapreq\fR\|(3) manpage for more details. .IP "$self\->base_server" 4 .IX Item "$self->base_server" Returns the physical server this connection came in on (main server or vhost): .IP "$self\->hostname" 4 .IX Item "$self->hostname" Returns the virtual server name .IP "$self\->cast_custom_error" 4 .IX Item "$self->cast_custom_error" Called by the handler in Gantry.pm when things go wrong. It receives html output and a death message. It logs the death message and sets the html output via the custom_response routine of the request object. Returns \s-1FORBIDDEN\s0 status code. .IP "$self\->consume_post_body" 4 .IX Item "$self->consume_post_body" This must be used by a plugin at the pre_init phase. It takes all of the data from the body of the \s-1HTTP\s0 \s-1POST\s0 request, storing it for retrieval via \f(CW\*(C`get_post_body\*(C'\fR. You cannot mix this with regular form handling. .IP "$self\->declined_response" 4 .IX Item "$self->declined_response" Returns the proper numeric status code for \s-1DECLINED\s0. .IP "dispatch_location" 4 .IX Item "dispatch_location" The uri tail specific to this request. Returns: .Sp .Vb 1 \& $self->uri, $self->location .Ve .Sp Note that this is a two element list. .IP "$self\->engine" 4 .IX Item "$self->engine" Returns the name of the engine, i.e. Gantry::Engine::MP13 .IP "$self\->engine_init" 4 .IX Item "$self->engine_init" Receives the request object and stores it in the site object. Returns nothing useful. .IP "$self\->err_header_out" 4 .IX Item "$self->err_header_out" The \f(CW$r\fR\->err_headers_out method will return a \f(CW%hash\fR of server response headers. This can be used to initialize a perl hash, or one could use the \f(CW$r\fR\->\fIerr_header_out()\fR method (described below) to retrieve or set a specific header value directly .Sp See mod_perl docs. .IP "fish_config" 4 .IX Item "fish_config" Pass this method the name of a conf parameter you need. Returns the value for the parameter. .IP "fish_location" 4 .IX Item "fish_location" Returns the location for the current request. .IP "fish_method" 4 .IX Item "fish_method" Returns the \s-1HTTP\s0 method of the current request. .IP "fish_path_info" 4 .IX Item "fish_path_info" Returns the path info for the current request. .IP "fish_uri" 4 .IX Item "fish_uri" Returns the uri for the current request. .IP "fish_user" 4 .IX Item "fish_user" Returns the currently logged-in user. .IP "$self\->get_arg_hash" 4 .IX Item "$self->get_arg_hash" .Vb 1 \& returns a hash of url arguments. .Ve .Sp .Vb 1 \& /some/where?arg1=don&arg2=johnson .Ve .IP "$self\->get_auth_dbh" 4 .IX Item "$self->get_auth_dbh" Same as get_dbh, but for the authentication database. .IP "$self\->get_cached_config" 4 .IX Item "$self->get_cached_config" Users should call get_config instead. .Sp Pulls the config object out of the pnotes so Gantry::Conf doesn't have to regenerate it repeatedly. (See set_cached_config.) .IP "get_config" 4 .IX Item "get_config" If you are using Gantry::Conf, this will return the config hash reference for the current location. .IP "get_cached_conf/set_cached_conf" 4 .IX Item "get_cached_conf/set_cached_conf" These cache the Gantry::Conf config hash in pnotes. Override them if you want more persistent caching. These are instance methods. get receives the invoking object, the name of the GantryConfInstance, and the current location (for ease of use, its also in the invocant). set receives those plus the conf hash it should cache. .IP "$self\->get_dbh" 4 .IX Item "$self->get_dbh" Returns the current regular database connection if one is available or undef otherwise. .IP "$self\->get_post_body" 4 .IX Item "$self->get_post_body" If \f(CW\*(C`consume_post_body\*(C'\fR was used by a plugin during the pre_init phase, this method returns the consumed body of the \s-1HTTP\s0 \s-1POST\s0 request. .IP "$self\->header_in" 4 .IX Item "$self->header_in" The \f(CW$r\fR\->headers_in method will return a \f(CW%hash\fR of client request headers. This can be used to initialize a perl hash, or one could use the \&\f(CW$r\fR\->\fIheader_in()\fR method (described below) to retrieve a specific header value directly. .Sp See mod_perl docs. .ie n .IP "$self\->header_out( $r\fR, \f(CW$header_key\fR, \f(CW$header_value )" 4 .el .IP "$self\->header_out( \f(CW$r\fR, \f(CW$header_key\fR, \f(CW$header_value\fR )" 4 .IX Item "$self->header_out( $r, $header_key, $header_value )" Change the value of a response header, or create a new one. .IP "$self\->is_status_declined" 4 .IX Item "$self->is_status_declined" Returns a true value if the status is currently \s-1DECLINED\s0 or false otherwise. .IP "$self\->log_error( message )" 4 .IX Item "$self->log_error( message )" Writes message to the apache web server log .IP "$self\->port" 4 .IX Item "$self->port" Returns port number in which the request came in on. .ie n .IP "$self\->print_output( $response_page )" 4 .el .IP "$self\->print_output( \f(CW$response_page\fR )" 4 .IX Item "$self->print_output( $response_page )" This method sends the contents of \f(CW$response\fR page back to apache. It uses the print method on the request object. .IP "$self\->redirect_response" 4 .IX Item "$self->redirect_response" Returns the proper numeric status code for \s-1REDIRECT\s0. .IP "$self\->remote_ip" 4 .IX Item "$self->remote_ip" Returns the \s-1IP\s0 address for the remote user .IP "$self\->send_error_output" 4 .IX Item "$self->send_error_output" Returns the content of custom_error. It gives $@ to the custom_error method. .ie n .IP "$self\->send_http_header( $r )" 4 .el .IP "$self\->send_http_header( \f(CW$r\fR )" 4 .IX Item "$self->send_http_header( $r )" Send the response line and all headers to the client. Takes an optional parameter indicating the content-type of the response, i.e. 'text/html'. .Sp This method will create headers from the \f(CW$r\fR\->\fIcontent_xxx()\fR and \f(CW$r\fR\->\fIno_cache()\fR attributes (described below) and then append the headers defined by \&\f(CW$r\fR\->header_out (or \f(CW$r\fR\->err_header_out if status indicates an error). .Sp See mod_perl 1.0 docs. .IP "$self\->server_root" 4 .IX Item "$self->server_root" Returns the value set by the top-level ServerRoot directive .IP "set_cached_config" 4 .IX Item "set_cached_config" For internal use. Used to place a config hash into pnotes for reuse during the current page request. .IP "$self\->\fIset_content_type()\fR" 4 .IX Item "$self->set_content_type()" Sets the content type stored in the site object's content_type attribute on the apache request object. .IP "$self\->set_no_cache" 4 .IX Item "$self->set_no_cache" Sets the no_cache flag in the apache request object with the value for no_cache in the site object. .IP "set_req_params" 4 .IX Item "set_req_params" Sets up the apreq object and the form parameters from it. .IP "$self\->status_const( '\s-1OK\s0 | \s-1DECLINED\s0 | \s-1REDIRECT\s0' )" 4 .IX Item "$self->status_const( 'OK | DECLINED | REDIRECT' )" Get or set the reply status for the client request. The Apache::Constants module provide mnemonic names for the status codes. .IP "$self\->success_code" 4 .IX Item "$self->success_code" Returns the proper numeric status code for \s-1OK\s0. .IP "$self\->file_upload" 4 .IX Item "$self->file_upload" Uploads a file from the client's disk. .Sp Parameter: The name of the file input element on the html form. .Sp Returns: A hash with these keys: .RS 4 .IP "unique_key" 4 .IX Item "unique_key" a unique identifier for this upload .IP "name" 4 .IX Item "name" the base name of the file .IP "suffix" 4 .IX Item "suffix" the extension (file type) of the file .IP "fullname" 4 .IX Item "fullname" name.suffix .IP "size" 4 .IX Item "size" bytes in file .IP "mime" 4 .IX Item "mime" mime type of file .IP "filehandle" 4 .IX Item "filehandle" a handle you can read the file from .RE .RS 4 .RE .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fImod_perl\fR\|(3), \fIGantry\fR\|(3) .SH "LIMITATIONS" .IX Header "LIMITATIONS" .SH "AUTHOR" .IX Header "AUTHOR" Tim Keefer .SH "COPYRIGHT and LICENSE" .IX Header "COPYRIGHT and LICENSE" Copyright (c) 2005\-6, Tim Keefer. .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.