Eidolon::Core::CGI - common gateway interface functions for Eidolon.
The Eidolon::Core::CGI class provides standard CGI functions - GET/POST requests parsing, cookies & session handling. It's more comfortable and fast replacement of old CGI package.
Class constructor. Creates an object and calls the initialization function.
Decodes an url-encoded
Returns a value of the GET parameter. If
$name of variable is not given, returns a hashref with all GET parameters.
Returns a value of the POST parameter. If
$name of variable is not given, returns a hashref with all POST parameters.
Returns a cleaned query string.
Returns a hashref with uploaded file data:
Uploaded file name.
Path to temporary file, where uploaded file contents are stored. This file is automatically deleted during Eidolon::Core::CGI object destruction, so you don't need to care about this.
Uploaded file extension.
$name of parameter is not given, returns a hashref with all uploaded files.
Returns contents of the uploaded file.
$name - name of upload variable.
Returns a value of the GET or POST parameter with the given
$name. If variable
$name exists both in GET and POST requests, value will be taken from first.
Returns a cookie value.
Sets a cookie.
$expires - is a number of seconds in which the cookie will be expired.
Returns a randomly-generated string with.
$len - length of the string to be generated. If
$len is not specified, 32-character string will be generated.
Initialize user session. Generates a magic session ID and sets a cookie with this value to user.
Destroys the session, if any.
Checks if session was started.
Sets session parameter
$key with the given
$key session parameter value.
Checks if HTTP header is already sent. Returns 1 or 0.
Adds user-defined header string
Sends a redirect header to web browser.
Sends HTTP header to browser.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Anton Belousov, <firstname.lastname@example.org>
Copyright (c) 2009, Atma 7, http://www.atma7.com