MojoX::Controller - Controller Base Class
use base 'MojoX::Controller';
MojoX::Controller is an abstract controllers base class.
app
my $app = $c->app; $c = $c->app(MojoSubclass->new);
A reference back to the application that dispatched to this controller.
MojoX::Controller inherits all methods from Mojo::Base and implements the following new ones.
render_exception
$c->render_exception($e);
Turn exception into output.
render_not_found
$c->render_not_found;
Default output.
stash
my $stash = $c->stash; my $foo = $c->stash('foo'); $c = $c->stash({foo => 'bar'}); $c = $c->stash(foo => 'bar');
Non persistent data storage and exchange.
$c->stash->{foo} = 'bar'; my $foo = $c->stash->{foo}; delete $c->stash->{foo};
Mojolicious, Mojolicious::Guides, http://mojolicious.org.
To install Mojolicious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious
CPAN shell
perl -MCPAN -e shell install Mojolicious
For more information on module installation, please visit the detailed CPAN module installation guide.