The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Amon2::Plugin::Web::PlackSession - Plack::Session integration for Amon2

SYNOPSIS

    use Amon2::Lite;
    use Plack::Builder;

    get '/' => sub {
        my $c = shift;
        my $cnt = $c->session->get('cnt') || 0;
        $c->session->set( 'cnt', ++$cnt );
        return $c->create_response(
            200,
            [
                'Content-Type'   => 'text/plain',
                'Content-Length' => length($cnt)
            ],
            [$cnt]
        );
    };

    builder {
        enable 'Session';
        MyApp::Web->to_app();
    };

DESCRIPTION

This module is glue for Amon2 and Plack::Session.

This module provides $c->session method. It returns instance of Plack::Session.

SEE ALSO

Plack::Session