Amon2::Web - Web Application Base.
package MyApp; use parent qw/Amon2/; package MyApp::Web; use parent qw/MyApp Amon2::Web/;
This is a web application base class.
Create new request object from $c.
$c
You can override this method to change request object's class.
Create new response object.
You can override this method to change response object's class.
Create new view object. View object should have $view->render(@_) method.
$view->render(@_)
You can override this method to change view object's class.
Do dispatch request. This method must return instance of Plack::Response.
You can override this method to change behavior.
Returns default Content-Type value for the HTML response.
This is a accessor method to get request object in this context.
Create a response object to redirect for $location with \%parameters.
$location
\%parameters
$c->redirect('/foo', +{bar => 3})
is same as following(if base URL is http://localhost:5000/)
$c->create_response(302, [Location => 'http://localhost:5000/foo?bar=3'])
Create new response object has 404 status code.
Create instance of PSGI application.
Create URI from $path and \%args.
$path
\%args
This method returns relative URI.
This method render HTML.
Return a encoding object using Encode::find_encoding().
Encode::find_encoding()
This method encode HTML from bytes.
To install Amon2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Amon2
CPAN shell
perl -MCPAN -e shell install Amon2
For more information on module installation, please visit the detailed CPAN module installation guide.