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

NAME

Amon2::Plugin::Web::HTTPSession - Plugin system for Amon2

SYNOPSIS

    package MyApp::Web;
    use parent qw/MyApp Amon2::Web/;
    use HTTP::Session::Store::Memcached;
    __PACKAGE__->load_plugins(qw/Web::HTTPSession/ => {
        state => 'URI',
        store => sub {
            my ($c) = @_;
            HTTP::Session::Store::Memcached->new(
                memd => $c->get('Cache::Memcached::Fast')
            );
        },
    });

    package MyApp::C::Root;
    use strict;
    use warnings;

    sub index {
        my ($class, $c) = @_;
        my $foo = $c->session->get('foo');
        if ($foo) {
              $c->session->set('foo' => $foo+1);
        } else {
              $c->session->set('foo' => 1);
        }
    }

DESCRIPTION

HTTP::Session integrate to Amon2.

After load this plugin, you can get instance of HTTP::Session from $c-session> method.

SEE ALSO

HTTP::Session