No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Amon2/Plugin/Web
t
.gitignore
.travis.yml
Build.PL
Changes
LICENSE
META.json
README.md
cpanfile
minil.toml

README.md

NAME

Amon2::Plugin::Web::HTTPSession - HTTP::Session bindings for Amon2

SYNOPSIS

use Amon2::Lite;

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')
        );
    },
});

get '/' => sub {
    my $c = shift;

    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.

LICENSE

Copyright (C) tokuhirom.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

tokuhirom tokuhirom@gmail.com

SEE ALSO

HTTP::Session, Amon2