logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

Plack::Session - Middleware for session management

Author

Bugs

       All  complex  software  has bugs lurking in it, and this module is no exception. If you find a bug please
       either email me, or add the bug to cpan-RT.

Description

       This is the core session object, you probably want to look at Plack::Middleware::Session, unless you are
       writing your own session middleware component.

Methods

new($env)
           The constructor takes a PSGI request env hash reference.

       id  This is the accessor for the session id.

   SessionDataManagement
       These methods allows you to read and write the session data like Perl's normal hash.

       get($key)set($key,$value)remove($key)keyssession, dumpSessionLifecycleManagementexpire
           This method can be called to expire the current session id.

Name

       Plack::Session - Middleware for session management

Synopsis

         # Use with Middleware::Session
         enable "Session";

         # later in your app
         use Plack::Session;
         my $app = sub {
             my $env = shift;
             my $session = Plack::Session->new($env);

             $session->id;
             $session->get($key);
             $session->set($key, $value);
             $session->remove($key);
             $session->keys;

             $session->expire;
         };

See Also