ASP4::SimpleCGI - Basic CGI functionality
use ASP4::SimpleCGI; my $cgi = ASP4::SimpleCGI->new( content_type => 'multipart/form-data', content_length => 1200, querystring => 'mode=create&uploadID=234234', body => ... ); my $val = $cgi->param('mode'); foreach my $key ( $cgi->param ) { print $key . ' --> ' . $cgi->param( $key ) . "\n"; }# end foreach() my $escaped = $cgi->escape( 'Hello world' ); my $unescaped = $cgi->unescape( 'Hello+world' ); my $upload = $cgi->upload('filename'); my $filehandle = $cgi->upload_info('filename', 'filehandle' );
This package provides basic CGI functionality and is also used for testing and in the API enironment.
ASP4::SimpleCGI uses HTTP::Body under the hood.
ASP4::SimpleCGI
Returns a new ASP4::SimpleCGI object.
%args can contain content_type, content_length, querystring and body.
%args
content_type
content_length
querystring
body
If $key is given, returns the value of the form or querystring parameter by that name.
$key
If $key is not given, returns a list of all parameter names.
Returns a URL-encoded version of $str.
$str
Returns a URL-decoded version of $str.
Returns all of the information we have about a file upload named $field_name.
$field_name
Returns just that part of $field_name's upload info.
It's possible that some bugs have found their way into this release.
Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=ASP4 to submit bug reports.
Please visit the ASP4 homepage at http://0x31337.org/code/ to see examples of ASP4 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.
To install ASP4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ASP4
CPAN shell
perl -MCPAN -e shell install ASP4
For more information on module installation, please visit the detailed CPAN module installation guide.