Amon2::Plugin::Web::HTTPSession - HTTP::Session bindings for Amon2
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); } };
HTTP::Session integrate to Amon2.
After load this plugin, you can get instance of HTTP::Session from $c->session method.
$c->session
Copyright (C) tokuhirom.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
tokuhirom <tokuhirom@gmail.com>
HTTP::Session, Amon2
To install Amon2::Plugin::Web::HTTPSession, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Amon2::Plugin::Web::HTTPSession
CPAN shell
perl -MCPAN -e shell install Amon2::Plugin::Web::HTTPSession
For more information on module installation, please visit the detailed CPAN module installation guide.