GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gantry::Engine::MP20(3) User Contributed Perl Documentation Gantry::Engine::MP20(3)

Gantry::Engine::MP20 - mod_perl 2.0 plugin ( or mixin )

  use Gantry::Engine::MP20;

This module is the binding between the Gantry framework and the mod_perl API. This particluar module contains the mod_perl 2.0 specific bindings.

See mod_perl documentation for a more detailed description for some of these bindings.

$self->apache_param_hash
Return a hash reference to the apache request body parameters.
$self->apache_uf_param_hash
Return a hash reference to the apache request body parameters unfiltered.
$self->apache_request
Apache::Request is a subclass of the Apache class, which adds methods for parsing GET requests and POST requests where Content-type is one of application/x-www-form-urlencoded or multipart/form-data. See the libapreq(3) manpage for more details.
$self->base_server
Returns the physical server this connection came in on (main server or vhost).
$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 HTTP POST request, storing it for retrieval via "get_post_body". You cannot mix this with regular form handling.
$self->hostname
Returns the virtual server name
$self->dispatch_location
Returns the tail of the uri specific to the current location, i.e.:

    $self->uri, $self->location
    

Note that this a two element list.

$self->engine
Returns the name of the engine, i.e. Gantry::Engine::MP20
$self->err_header_out
The $r->err_headers_out method will return a %hash of server response headers. This can be used to initialize a perl hash, or one could use the $r->err_header_out() method (described below) to retrieve or set a specific header value directly

See mod_perl docs.

fish_conf
Pass this method the name of a conf parameter you need. Returns the value for the parameter.
fish_location
Returns the location for the current request.
fish_method
Returns the HTTP method of the current request.
fish_path_info
Returns the path info for the current request.
fish_uri
Returns the uri for the current request.
fish_user
Returns the currently logged-in user.
$self->get_arg_hash
    returns a hash of url arguments.

    /some/where?arg1=don&arg2=johnson
    
$self->get_auth_dbh
Same as get_dbh, but for the authentication database connection.
get_config
If you are using Gantry::Conf, this will return the config hash reference for the current location.
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.
$self->get_dbh
Returns the current regular database connection if one is available or undef otherwise.
$self->get_post_body
If "consume_post_body" was used by a plugin during the pre_init phase, this method returns the consumed body of the HTTP POST request.
$self->header_in
The $r->headers_in method will return a %hash of client request headers. This can be used to initialize a perl hash, or one could use the $r->header_in() method (described below) to retrieve a specific header value directly.

See mod_perl docs.

$self->header_out( $r, $header_key, $header_value )
Change the value of a response header, or create a new one.
$self->log_error( message )
Writes message to the apache web server log
$self->print_output( $response_page )
This method sends the contents of $response page back to apache. It uses the print method on the request object.
$self->port
Returns port number in which the request came in on.
$self->remote_ip
Returns the IP address for the remote user
$self->send_httpd_header( $r )
Does nothing for mod_perl 2.0
$self->set_content_type()
Sends the content type stored in the site object's content_type attribute on the apache request object.
$self->set_no_cache
Sets the no_cache flag in the apache request object with the value for no_cache in the site object.
set_req_params
Sets up the apreq object and the form parameters from it.
$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.
$self->server_root
Returns the value set by the top-level ServerRoot directive
$self->file_upload
Uploads a file from the client's disk.

Parameter: The name of the file input element on the html form.

Returns: A hash with these keys:

unique_key
a unique identifier for this upload
name
the base name of the file
suffix
the extension (file type) of the file
fullname
name.suffix
size
bytes in file
mime
mime type of file
filehandle
a handle you can read the file from
cast_custom_error
declined_response
engine_init
Used internally by Gantry.pm.
fish_config
Call this with the name of a config param to retrieve its value. Intelligently choose conf source. It tries Gantry::Conf first, then falls back on dir_config.
get_cached_config
For internal use.
$self->is_connection_secure()
Return whether the current request is being served by an SSL-enabled host.
is_status_declined
redirect_response
send_error_output
send_http_header
set_cached_config
success_code
url_encode
  url_encode($value)
    

Accepts a value and returns it url encoded.

url_decode
  url_decode($value)
    

Accepts a value and returns it url decoded.

mod_perl(3), Gantry(3)

Tim Keefer <tkeefer@gmail.com>

Copyright (c) 2005-6, Tim Keefer.

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.

2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.