CGI::Mungo::Request - Form request class
my $r = $mungo->getRequest(); my $params = $r->getParameters();
Class to deal with the current page request
my $r = CGI::Mungo::Request->new();
Constructor, gets all the GET/POST information from the browser request.
my $params = $r->getParameters();
Returns a hash reference of all the GET/POST values from the current request.
my $rules = { 'age' => { 'rule' => '^\d+$', 'friendly' => 'Your Age' } }; #the form validation rules my($result, $errors) = $r->validate($rules);
Validates all the current form fields against the provided hash reference.
The hash reference contains akey for every field you are concerned about, which is a reference to another hash containing two elements. The first is the actaul matching rule. The second is the friendly name for the field used in the error message, if a problem with the field is found.
The method returns two values, first being a 0 or a 1 indicating the success of the form. The second is a reference to a list of errors if any.
$request->getHeader($name)
Returns the value of the specified request header.
MacGyveR <dumb@cpan.org>
Development questions, bug reports, and patches are welcome to the above address
Copyright (c) 2011 MacGyveR. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install CGI::Mungo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Mungo
CPAN shell
perl -MCPAN -e shell install CGI::Mungo
For more information on module installation, please visit the detailed CPAN module installation guide.