MojoX::Context - Context
use MojoX::Context; my $c = MojoX::Context->new;
MojoX::Context is a context container.
MojoX::Context implements the following attributes.
app
my $app = $c->app; $c = $c->app(MojoSubclass->new);
req
my $req = $c->req;
res
my $res = $c->res;
stash
my $stash = $c->stash; my $foo = $c->stash('foo'); $c = $c->stash({foo => 'bar'}); $c = $c->stash(foo => 'bar'); $c->stash->{foo} = 'bar'; my $foo = $c->stash->{foo}; delete $c->stash->{foo};
tx
my $tx = $c->tx;
MojoX::Context inherits all methods from Mojo::Base.
To install Mojo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo
CPAN shell
perl -MCPAN -e shell install Mojo
For more information on module installation, please visit the detailed CPAN module installation guide.