CallCGI - A CGI / ASP Wrapper Class


NAME

CallCGI - A CGI / ASP Wrapper Class


SYNOPSIS


 use CallCGI;
 my $CGI = new CallCGI;
 
 $Testing{'Key'} = "Value";
 
 $CGI->URL('www.perlconcepts.com/cgi-bin/test.cgi');
 $CGI->Data('Test=True');
 $CGI->TakeEnv();
 $CGI->AddValue('Order', 'True');
 $CGI->AddHash(%Testing);
 
 $CGI->CallCGI;
 
 print $CGI->Document;


DESCRIPTION

This is a library that allows you to call a CGI (or ASP) program from within you scripts. The second program can be any program that accepts POST input on any web server. You have the ability to manipulate the information before you send it to the remote CGI program. Also, you may manipulate the HTML that is returned by the remote CGI program prior to displaying it.

For more information visit www.perlconcepts.com.

 


METHODS

The following methods are available:

$CGI = new CallCGI([$URL [, $URLEncodedData]])
Constructor for the CallCGI object. Returns a reference to a CallCGI object.  You can pass the URL and URL Encoded Data to the constructor, or use the respective methods below.
 
$CGI->AddHash(%Hash)
 
Appends each of the Key/Value pairs of the associative array on to the URL Encoded Data property of the object.  First, all Keys and Values are URL Encoded.
 
$CGI->AddValue($Key, $Value)
Appends the Key/Value pair on to the URL Encoded Data property of the object.  First both the $Key and $Value are URL Encoded.
 
$CGI->CallCGI([$URL [, $URLEncodedData]])
This method retrieves the output from the CGI or ASP program specified in the object's URL property.

If $URL is present the method first sets the object's URL property to $URL.  If $URLEncodedData is present then the method first sets the object's URL Encoded Data property to $URLEncodedData.

$CGI->Data([$Data])
If $Data is present, the object's URL Encoded Data  property is set, and the function returns the previous value for this property.

If $Data is absent or undefined, the URL Encoded Data property is NOT set.  The function returns the current value for the URL Encoded Data property.

$CGI->Document()
 
Returns the HTML Code for the document retrieved from the CallCGI method.
 
$CGI->Status()
 
Returns the HTTP Status Header for the POST operation performed in the CallCGI method.
 
$CGI->TakeEnv()
Appends the POST or GET data from the current script on to the URL Encoded Data property of the object.
$CGI->URL([$URL])
If $URL is present, the object's URL property is set, and the function returns the previous value for this property.

If $URL is absent or undefined, the URL property is NOT set.  The function returns the current value for the URL property.

COPYRIGHT

Copyright 1998-2001 Joshua Freeman, ALL RIGHTS RESERVED.
See www.perlconcepts.com for further copyright information.

 CallCGI - A CGI / ASP Wrapper Class