1Plack::Session(3pm)   User Contributed Perl Documentation  Plack::Session(3pm)
2
3
4

NAME

6       Plack::Session - Middleware for session management
7

SYNOPSIS

9         # Use with Middleware::Session
10         enable "Session";
11
12         # later in your app
13         use Plack::Session;
14         my $app = sub {
15             my $env = shift;
16             my $session = Plack::Session->new($env);
17
18             $session->id;
19             $session->get($key);
20             $session->set($key, $value);
21             $session->remove($key);
22             $session->keys;
23
24             $session->expire;
25         };
26

DESCRIPTION

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

METHODS

33       new ( $env )
34           The constructor takes a PSGI request env hash reference.
35
36       id  This is the accessor for the session id.
37
38   Session Data Management
39       These methods allows you to read and write the session data like Perl's
40       normal hash.
41
42       get ( $key )
43       set ( $key, $value )
44       remove ( $key )
45       keys
46       session, dump
47
48   Session Lifecycle Management
49       expire
50           This method can be called to expire the current session id.
51

BUGS

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

AUTHOR

58       Stevan Little <stevan.little@iinteractive.com>
59
61       Copyright 2009, 2010 Infinity Interactive, Inc.
62
63       <http://www.iinteractive.com>
64
65       This library is free software; you can redistribute it and/or modify it
66       under the same terms as Perl itself.
67
68
69
70perl v5.36.0                      2023-01-20               Plack::Session(3pm)
Impressum