NAME

MojoX::Dispatcher::Routes::Controller - Controller Base Class

SYNOPSIS

    use base 'MojoX::Dispatcher::Routes::Controller';

DESCRIPTION

MojoX::Dispatcher::Routes::Controller is a controller base class.

ATTRIBUTES

MojoX::Dispatcher::Routes::Controller implements the following attributes.

app

    my $app = $c->app;
    $c      = $c->app(MojoSubclass->new);

match

    my $match = $c->match;

tx

    my $tx = $c->tx;

METHODS

MojoX::Dispatcher::Routes::Controller inherits all methods from Mojo::Base and implements the following new ones.

render

    $c->render;

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};