Kevin Treleaven > Anansi-Script-CGI-0.02 > Anansi::Script::CGI

Download:
Anansi-Script-CGI-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Anansi::Script::CGI - Defines the mechanisms specific to handling web browser execution.

SYNOPSIS ^

 my $OBJECT = Anansi::Script::CGI->new();

DESCRIPTION ^

This module is designed to be an optional component module for use by the Anansi::Script component management module. It defines the processes specific to handling both input and output from Perl scripts that are executed by a web server using the Common Gateway Interface. See Anansi::Component for inherited methods.

METHODS ^

content

 my $contents = $OBJECT->content();

 # OR

 my $contents = $OBJECT->channel('CONTENT');

 # OR

 if(1 == $OBJECT->content(undef, undef));

 # OR

 if(1 == $OBJECT->channel('CONTENT', undef));

 # OR

 if(1 == $OBJECT->content(undef, 'some content'));

 # OR

 if(1 == $OBJECT->channel('CONTENT', 'some content'));

Either returns the existing content or redefines the content.

finalise

 $OBJECT::SUPER->finalise(@_);

An overridden virtual method called during object destruction. Not intended to be directly called unless overridden by a descendant.

header

 my $headers = $OBJECT->header();

 # OR

 my $headers = $OBJECT->channel('HEADER');

 # OR

 my $headerValue = $OBJECT->header(undef, 'header_name');

 # OR

 my $headerValue = $OBJECT->channel('HEADER', 'header_name');

 # OR

 if($OBJECT->header(undef, 'header_name' => 'header value', 'another_header' => undef, 'yet_another_header' => [1, 2, 3], 'one_more' => {'hash key' => 'some value', 'another key' => undef}));

 # OR

 if($OBJECT->channel('HEADER', 'header_name' => 'header value', 'another_header' => undef, 'yet_another_header' => [1, 2, 3], 'one_more' => {'hash key' => 'some value', 'another key' => undef}));

Either returns an ARRAY of all the existing header names or returns the value of a specific header or sets the value of one or more headers. Assigning an "undef" value to a header has the effect of deleting the header. Assigning an "undef" HASH key value to a header's HASH value has the effect of deleting the HASH key value.

initialise

 $OBJECT::SUPER->initialise(@_);

An overridden virtual method called during object creation. Not intended to be directly called unless overridden by a descendant.

loadHeaders

 $OBJECT->loadHeaders();

Loads all of the CGI headers supplied upon page REQUEST.

loadParameters

 $OBJECT->loadParameters();

Loads all of the CGI parameters supplied upon page REQUEST.

medium

 my $medium = Anansi::Script::CGI->medium();

 # OR

 my $medium = $OBJECT->medium();

 # OR

 my $medium = $OBJECT->channel('MEDIUM');

Returns the STRING description of the medium this module is designed to handle.

parameter

 my $parameters = $OBJECT->parameter();

 # OR

 my $parameters = $OBJECT->channel('PARAMETER');

 # OR

 my $parameterValue = $OBJECT->parameter(undef, 'parameter name');

 # OR

 my $parameterValue = $OBJECT->channel('PARAMETER', 'parameter name');

 # OR

 if($OBJECT->parameter(undef, 'parameter name' => 'parameter value', 'another parameter' => undef));

 # OR

 if($OBJECT->channel('PARAMETER', 'parameter name' => 'parameter value', 'another parameter' => undef));

Either returns an ARRAY of all the existing parameter names or returns the value of a specific parameter or sets the value of one or more parameters. Assigning an "undef" value has the effect of deleting the parameter.

saveHeaders

 $OBJECT->saveHeaders();

Prints the CGI headers.

validate

 my $valid = $OBJECT->validate();

 # OR

 my $valid = $OBJECT->channel('VALIDATE_AS_APPROPRIATE');

Determines whether this module is the correct one to use for handling Perl script execution.

AUTHOR ^

Kevin Treleaven <kevin AT treleaven DOT net>

syntax highlighting: