session::db_file(3)
NAME
CGI::Session::DB_File - Driver for CGI::Session class
SYNOPSIS
use constant COOKIE => "TEST_SID"; # cookie to store
the session id
use CGI::Session::DB_File;
my $session = new CGI::Session::DB_File(undef,
{
LockDirectory =>'/tmp/locks',
FileName => '/tmp/sessions.db'
});
# For examples look at CGI::Session manual
DESCRIPTION
"CGI::Session::DB_File" is the driver for "CGI::Session"
to store and retrieve the session data in and from the
Berkeley DB 1.x. To be able to write your own drivers for
the CGI::Session, please consult developer section of the
manual.
Constructor requires two arguments, as all other CGI::Ses
sion drivers do. The first argument has to be session id
to be initialized (or undef to tell the CGI::Session to
create a new session id). The second argument has to be a
reference to a hash with two following require key/value
pairs:
- "Filename"
- path to a file where all the session data will be
stored - "LockDirectory"
- path in the file system where all the lock files for
the sessions will be stored - "CGI::Session::DB_File" uses Data::Dumper to serialize the
session data before storing it in the session file. - For more extensive examples of the "CGI::Session" usage,
please refer to CGI::Session manual
AUTHOR
Sherzod B. Ruzmetov <sherzodr@cpan.org>
COPYRIGHT
This library is free software and can be redistributed
under the same conditions as Perl itself.
SEE ALSO
- CGI::Session, CGI::Session::File, CGI::Session::DB_File,
CGI::Session::MySQL, Apache::Session