NAME

MojoX::Session::Cookie::Controller - Controller Base Class

SYNOPSIS

    use base 'MojoX::Session::Cookie::Controller';

DESCRIPTION

MojoX::Session::Cookie::Controller is a controller base class.

ATTRIBUTES

MojoX::Session::Cookie::Cotnroller inherits all attributes from MojoX::Controller.

METHODS

MojoX::Session::Cookie::Controller inherits all methods from MojoX::Controller and implements the following ones.

flash

    my $flash = $c->flash;
    my $foo   = $c->flash('foo');
    $c        = $c->flash({foo => 'bar'});
    $c        = $c->flash(foo => 'bar');

Data storage persistent for a single request, stored in the session.

    $c->flash->{foo} = 'bar';
    my $foo = $c->flash->{foo};
    delete $c->flash->{foo};

session

    my $session = $c->session;
    my $foo     = $c->session('foo');
    $c          = $c->session({foo => 'bar'});
    $c          = $c->session(foo => 'bar');

Persistent data storage, by default stored in a signed cookie. Note that cookies are generally limited to 4096 bytes of data.

    $c->session->{foo} = 'bar';
    my $foo = $c->session->{foo};
    delete $c->session->{foo};

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicious.org.