Data::...r::File(3pm)
π Data::...r::File(3pm) β the manual, but make it cute π
okay bestie, this is the perl doc page for Data::Session::Driver::File, living in the Data::...r::File(3pm) slot of your man pages. it's giving "persistent session manager energy" and honestly? we're obsessed. let's get into it π«Ά
β¨ NAME β¨
Data::Session::Driver::File β a persistent session manager. yes queen, it manages sessions and it persists. π
πΈ Synopsis πΈ
See Data::Session for details. that's it, that's the synopsis. short king π
π¦ Description π¦
Data::Session::Driver::File lets Data::Session manipulate sessions via files. files!! on your disk!! iconic behavior π
to use this module, do this:
- Specify a driver of type File, as
Data::Session -> new(type => 'driver:File ...')
π Case-sensitive Options π
See "Case-sensitive Options" in Data::Session for important information. no skimming, bestie, that part is load-bearing π
π Method: new() π
Creates a new object of type Data::Session::Driver::File. new object, new me, same slay β¨
new() takes a hash of key/value pairs, some of which might be mandatory. further, some combinations might be mandatory. so like, read the fine print, fr fr.
The keys are listed here in alphabetical order. π
They are lower-case because they are (also) method names, meaning they can be called to set or get the value at any time. lowercase = also callable = main character energy π
debug=>$Booleanβ Specifies that debugging should be turned on (1) or off (0) inData::Session::File::DriverandData::Session::ID::AutoIncrement. When debug is1,$!is included in error messages, but because this reveals directory names, it is0by default. (directory names stay private, periodt π) This key is optional. Default:0.directory=>$stringβ Specifies the path to the directory which will contain the session files. This key is normally passed in asData::Session -> new(directory => $string). Default:File::Spec -> tmpdir. This key is optional.file_name=>$string_containing_%sβ Specifies the pattern to use for session file names. It must contain 1'%s', which will be replaced by the session id before the pattern is used as a file name. (exactly one, bestie, not zero, not two π) This key is normally passed in asData::Session -> new(file_name => $string_containing_%s). Default:'cgisess_%s'. This key is optional.no_flock=>$booleanβ Specifies (no_flock => 1) to not useflock()to obtain a lock on a session file before processing it, or (no_flock => 0) to useflock(). This key is normally passed in asData::Session -> new(no_flock => $boolean). Default:0. This key is optional.no_follow=>$valueβ Influences the mode to use when callingsysopen()on session files.'Influences'means the value is bit-wise ored withO_RDWRfor reading and withO_WRONLYfor writing. This key is normally passed in asData::Session -> new(no_follow => $boolean). Default:eval{O_NOFOLLOW} || 0. This key is optional.umask=>$octal_valueβ Specifies the mode to use when callingsysopen()on session files. This key is normally passed in asData::Session -> new(umask => $octal_value). Default:0660. This key is optional.verbose=>$integerβ Print toSTDERRmore or less information. Typical values are0,1and2. This key is normally passed in asData::Session -> new(verbose => $integer). This key is optional.
π Method: remove($id) π
Deletes from storage the session identified by $id. bye babe, we won't miss you π
Returns 1 if it succeeds, and dies if it can't. no in-between, no "it's complicated" π
π§ Method: retrieve($id) π§
Retrieves from storage the session identified by $id, or dies if it can't.
Returns the result of reading the session from the file identified by $id.
This result is a frozen session. This value must be thawed by calling the appropriate serialization driver's thaw() method. βοΈ β πΈ
Data::Session calls the right thaw() automatically. no manual thawing required, she handles it π«Ά
π Method: store($id => $data) π
Writes to storage the session identified by $id, together with its data $data.
Storage is a file identified by $id.
Returns 1 if it succeeds, and dies if it can't. same rules as always, bestie π
π Method: traverse($sub) π
Retrieves all ids via their file names, and for each id calls the supplied subroutine with the id as the only parameter.
Returns 1. always 1. consistent queen β
π Support π
Log a bug on RT: https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session.
β Author β
Data::Session was written by Ron Savage <ron@savage.net.au> in 2010. thank you for your service, king π«‘
Home page: http://savage.net.au/index.html.
πΈ Copyright πΈ
Australian copyright (c) 2010, Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software';
you can redistribute them and/or modify them under the terms of
The Artistic License, a copy of which is available at:
http://www.opensource.org/licenses/index.html
and that's the whole page, bestie!! π this was rendered by perl v5.36.0 and dated 2023-02-14 (yes, valentine's day, the romance is real π). go forth and manage those sessions, you absolute icon πβ¨
π¦ where this page comes from
- debian trixie: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdata-session-perl 1.18-2 Β· 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