Dancer2::Session::PSGI - Dancer2 session storage via Plack::Middleware::Session
version 0.010
use Dancer2; setting( session => 'PSGI' ); get '/' => sub { my $count = session("counter"); session "counter" => ++$count; return "This is my ${count}th dance"; };
This module implements implements a session factory for Dancer2 that uses Plack::Middleware::Session for session management.
The setting session should be set to PSGI in order to use this session engine in a Dancer2 application.
PSGI
The default cookie name is plack_session. Refer to "Session_engine" in Dancer2::Config if you need to modify this.
plack_session
The methods required by Dancer2::Core::Role::SessionFactory were heavily based on Dancer2::Session::Cookie by David Golden.
Russell Jenkins <russellj@cpan.org>
This software is copyright (c) 2014 by Russell Jenkins.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dancer2::Session::PSGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Session::PSGI
CPAN shell
perl -MCPAN -e shell install Dancer2::Session::PSGI
For more information on module installation, please visit the detailed CPAN module installation guide.