SYNOPSIS

    A basic psgi application

        use strict; use warnings;
        use Plack::Builder;
    
        my $app = sub {
            my $session = (shift)->{'psgix.session'};
            return [
                200,
                [ 'Content-Type' => 'text/plain' ],
                [ "Hello, you've been here for ", $session->{counter}++, "th time!" ],
            ];
        };
    
        builder { enable 'Session', store => 'File'; $app; };

    In your app.psgi:

        builder {
            enable "Session", store => "File";
            sub { my $env = shift; my $request = Dancer::Request->new($env); Dancer->dance($request);};
        };

    And a simple Dancer application:

       package session;
       use Dancer ':syntax';
    
        get '/' => sub {
            my $count = session("counter");
            session "counter" => ++$count;
            template 'index', {count => $count};
        };

    Now, your two applications can share the same session informations.

DESCRIPTION

    Dancer::Session::PSGI let you use Plack::Middleware::Session as backend
    for your sessions.

MAINTAINER

    Dancer Core Team

