Plack:...:Cookie(3pm)
π Plack::Session::State::Cookie π
okay bestie, it's Plack::Session::State::Cookie β the Basic cookie-based session state situation. it's giving "User Contributed Perl Documentation", it's giving "Plack:...:Cookie(3pm)", and honestly? iconic.
β¨ NAME β¨
Plack::Session::State::Cookie β basic cookie-based session state, no cap πͺ
πΈ SYNOPSIS πΈ
use Plack::Builder;
use Plack::Middleware::Session;
my $app = sub {
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
};
builder {
enable 'Session'; # Cookie is the default state
$app;
};
π¦ DESCRIPTION π¦
so basically, this is a subclass of Plack::Session::State and it implements its full interface β the whole thing, periodt. and plot twist: this is the default state used in Plack::Middleware::Session. so when you just enable 'Session' and don't say anything else, THIS is the girl running the show π
π METHODS π
new ( %params )β the constructor, obvi. the%paramscan includepath,domain,expires,secure, andhttponlyoptions, plus all the options accepted byPlack::Session::State. yes, all of them. she's generous πpathβ path of the cookie, and this defaults to"/".domainβ domain of the cookie. if nothing is supplied, then it will not be included in the cookie. so it's optional, and staying quiet is a valid choice π«Άexpiresβ expiration time of the cookie, in seconds. if nothing is supplied, then it will not be included in the cookie, which means the session expires per browser session. so basically, no option = the session dips when your browser dips πsecureβ secure flag for the cookie. if nothing is supplied, then it will not be included in the cookie.httponlyβ HttpOnly flag for the cookie. if nothing is supplied, then it will not be included in the cookie.samesiteβ SameSite flag for the cookie. if nothing is supplied, then it will not be included in the cookie. (yes she's here too, don't skip her π)
little vibe check:newlistspath,domain,expires,secure, andhttponlyfor%paramsβ andsamesitestill gets its own method below. i'm just saying what the page says, bestie, i don't make the rules π
π 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. not me asking you to snitch on the bugs, but likeβ¦ please do πΈ
π AUTHOR π
Stevan Little <stevan.little@iinteractive.com> β we stan β¨
π 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.
okay that's the whole page, you ate it, you're a Unix main character now π§ slay. this was brought to you by user-contributed Perl docs, perl v5.40.1, dated 2025-08-10, under the Plack:...:Cookie(3pm) header β mwah, take care of her, bye bestie ππ
π¦ 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