Plack:...::Store(3pm)
π Plack::Session::Store π
okay bestie, so this is the manual page for Plack::Session::Store (that's the 3pm one, obvi) β and it's literally the chillest little session store you'll ever meet. it keeps everything in memory, it's adorable, and it's here to help you understand the whole Plack::Session::Store::* family. let's get into it π«Ά
β¨ NAME β¨
Plack::Session::Store β a basic in-memory session store. yep, that's the whole pitch, and honestly? iconic. π
πΈ SYNOPSIS πΈ
here's the vibe, copy-paste ready:
use Plack::Builder;
use Plack::Middleware::Session;
use Plack::Session::Store;
my $app = sub {
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
};
builder {
enable 'Session'; # this is the default store
$app;
};
like yes, enable 'Session' and you're done, because this is the default store. no extra setup, no drama. π
π¦ DESCRIPTION π¦
okay so, this is a very basic in-memory session data store. it's volatile storage, which is the fancy way of saying "it forgets everything the moment it goes away." and it is NOT recommended for multiprocessing environments β fr fr, do not do that to yourself. π
BUT. it is very useful for development and testing, which is where it absolutely eats. it's giving "perfect for your local setup" energy. π₯
also, you should think of this as the store "base" class (though, lowkey, subclassing is not a requirement β you're free, bestie) and it defines the spec for all Plack::Session::Store::* modules. so if you do end up subclassing, you'll literally only need to override a couple of methods. see the other Plack::Session::Store::* modules for examples of this β they're the blueprint, iykyk. β¨
π METHODS π
new ( %params )
no parameters are expected by this constructor. it just works. main character energy, honestly. π
π Session Data Management
these methods fetch data from the session storage. the whole design is meant to store or delete multiple keys at a time, so it's efficient and unbothered. π
fetch ( $session_id )β grabs your session data, based on the$session_idyou hand it.store ( $session_id, $session )β tucks your$sessiondata away under that$session_id. remember, this is memory-only, so it's a temporary little home. π
π§ Storage Management
remove ( $session_id )β this one gets called by thePlack::Session"expire"method, and it's the one in charge of removing any session data. bye-bye session, you were lovely. π
π 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. do it for the girls (the girls are the perl community).
π AUTHOR π
Stevan Little <stevan.little@iinteractive.com>
π COPYRIGHT AND LICENSE π
Copyright 2009, 2010 Infinity Interactive, Inc.
this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay, open source. π
and that's the whole page, bestie! π«Ά this was written for perl v5.40.1 and dated 2025-08-10 β and it's the Plack:...::Store(3pm) page, so now you know exactly where you are. go forth and store some sessions (in memory, temporarily, respectfully). β¨πΈπ
π¦ where this page comes from
- ubuntu resolute: libplack-middleware-session-perl 0.36-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libplack-middleware-session-perl 0.36-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms