| Data::Session::Driver::File - A persistent session manager |
new()remove($id)retrieve($id)traverse($sub)the Data::Session::Driver::File manpage - A persistent session manager
See the Data::Session manpage for details.
the Data::Session::Driver::File manpage allows the Data::Session manpage to manipulate sessions via files.
To use this module do this:
See Case-sensitive Options in the Data::Session manpage for important information.
new()Creates a new object of type the Data::Session::Driver::File manpage.
new() takes a hash of key/value pairs, some of which might mandatory. Further, some combinations
might be mandatory.
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.
Specifies the path to the directory which will contain the session files.
This key is normally passed in as Data::Session -> new(directory => $string).
The default value is File::Spec -> tmpdir.
This key is optional.
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.
This key is normally passed in as Data::Session -> new(file_name => $string_containing_%s).
The default value is 'cgisess_%s'.
This key is optional.
Specifies (no_flock => 1) to not use flock() to obtain a lock on a session file before processing it,
or (no_flock => 0) to use flock().
This key is normally passed in as Data::Session -> new(no_flock => $boolean).
The default value is 0.
This key is optional.
Influences the mode to use when calling sysopen() on session files.
'Influences' means the value is bit-wise ored with O_RDONLY for reading and with O_WRONLY for writing.
This key is normally passed in as Data::Session -> new(no_follow => $boolean).
The default value is eval{O_NOFOLLOW} || 0.
This key is optional.
Specifies the mode to use when calling sysopen() on session files.
This key is normally passed in as Data::Session -> new(umask => $octal_value).
The default value is 0660.
This key is optional.
Print to STDERR more or less information.
Typical values are 0, 1 and 2.
This key is normally passed in as Data::Session -> new(verbose => $integer).
This key is optional.
remove($id)Deletes from storage the session identified by $id.
Returns 1 if it succeeds, and dies if it can't.
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.
the Data::Session manpage calls the right thaw() automatically.
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.
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.
Log a bug on RT: https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session.
the Data::Session manpage was written by Ron Savage <ron@savage.net.au> in 2010.
Home page: http://savage.net.au/index.html.
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
| Data::Session::Driver::File - A persistent session manager |