NAME
CGI::Mungo - Very simple CGI web framework
SYNOPSIS
use CGI::Mungo;
my $options = {
'responsePlugin' => 'Some::Class'
};
my $m = CGI::Mungo->new($options);
my $actions = {
"default" => sub{}, #do nothing
"list" => \&someSub(), #use a named sub
"add" => sub{my $var = 1;} #use an anonymous sub
};
$m->setActions($actions);
$m->run(); #do this thing!
DESCRIPTION
All action subs are passed a CGI::Mungo object as the only parameter, from this you should be able to reach everything you need.
METHODS
new()
my $options = {
'responsePlugin' => 'Some::Class',
'checkReferer' => 0
};
my $m = CGI::Mungo->new($options);
Constructor, requires a hash references to be passed as the only argument. This hash reference contains any general options for the framework.
getResponse()
my $response = $m->getResponse();
Returns an instance of the response plugin object, previously defined in the constructor options.
getSession()
getRequest()
setActions()
getAction()
run()
Notes
To change the session prefix characters use the following code at the top of your script:
$CGI::Mungo::Session::prefix = "ABC";
Author
MacGyveR <dumb@cpan.org>
Development questions, bug reports, and patches are welcome to the above address
Copyright
Copyright (c) 2009 MacGyveR. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 32:
You can't have =items (as at line 48) unless the first thing after the =over is an =item