
Apache2::ASP::Request - Incoming request processor

<%
# Cookies:
my $cookie = $Request->Cookies( "mycookie" );
my $cookie2 = $Request->Cookies( "cookie2", "fieldname" );
# Form/QueryString values:
my $Form = $Request->Form; # returns a hashref of all form/querystring data:
my $name = $Form->{user_name};
my $name = $Request->Form( 'user_name' );
# File uploads (a):
my $ifh = $Request->FileUpload( "fieldname" );
while( my $line = <$ifh> )
{
# Process $line from file:
}# end while()
# File uploads (b):
my %info = $Request->FileUpload( "fieldname" );
# %info has the following structure:
%info = (
'ContentType' => 'image/gif',
'FileHandle' => <an IO::Handle object>,
'BrowserFile' => 'C:\Documents and Settings\franky\Desktop\myfile.gif'
);
# QueryString itself:
my $qstring = $Request->QueryString();
# ServerVariables:
my $host = $Request->ServerVariables( 'HTTP_HOST' );
%>

The global $Request object is an instance of Apache2::ASP::Request.

Given the $name only, returns the whole value of the cookie.
Given the $name and $key, returns only that part of a multi-value cookie.
Called without a $key, returns a hashref of all Form and QueryString data.
Called with a $key, returns only the value for that field.
Called in scalar context, returns a filehandle to the uploaded file.
Called in list context, returns a hash containing the following fields:
A value like image/gif or text/html. The MIME-Type of the uploaded file.
The stream/filehandle from which the contents of the uploaded file may be read.
The name of the file as it was on the client's side. For example, C:\Program Files\file.txt.
Returns the contents of $ENV{HTTP_QUERYSTRING} or an empty string if it is not available.
Called without a $key, returns a sorted list of all keys in %ENV.
Called with a $key, returns the value associated with that element in %ENV.
Returns the Apache2::ASP::DOM::Document of the current ASP script.
NOTE: If called from within an Included file, the Document will only contain the DOM for that file, not the entire document.

It's possible that some bugs have found their way into this release.
Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Apache2-ASP to submit bug reports.

Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Apache2::ASP in action.

John Drago mailto:jdrago_999@yahoo.com

Copyright 2007 John Drago, All rights reserved.
This software is free software. It may be used and distributed under the same terms as Perl itself.