CGI::Session::SQLite - CGI::Session driver for SQLite
use CGI::Session::SQLite $session = new CGI::Session("driver:SQLite", undef, {...});
For more examples, consult CGI::Session manual
CGI::Session::SQLite is a CGI::Session driver utilizing the SQLite DBMS. To write your own drivers for CGI::Session refer to the CGI::Session manual.
To store session data in SQLite database, you first need to create a suitable table for it with the following command:
CREATE TABLE sessions ( id CHAR(32) NOT NULL UNIQUE, a_session TEXT NOT NULL );
You can also add any number of additional columns to the table, but the above "id" and "a_session" are required.
If you want to store the session data in other table than "sessions", before creating the session object you need to set the special variable $CGI::Session::SQLite::TABLE_NAME to the name of the table:
use CGI::Session; $CGI::Session::SQLite::TABLE_NAME = 'my_sessions'; $session = new CGI::Session("driver:SQLite", undef, {Handle=>$dbh});
Copyright (C) 2004 Brian Moyles <bmoyles@gmail.com>. All rights reserved.
This library is free software and can be modified and distributed under the same terms as Perl itself.
Brian Moyles <bmoyles@gmail.com>
CGI::Session - CGI::Session manual
CGI::Session::Tutorial - extended CGI::Session manual
CGI::Session::CookBook - practical solutions for real life problems
RFC 2965 - "HTTP State Management Mechanism" found at ftp://ftp.isi.edu/in-notes/rfc2965.txt
CGI - standard CGI library
Apache::Session - another fine alternative to CGI::Session
To install CGI::Session::SQLite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Session::SQLite
CPAN shell
perl -MCPAN -e shell install CGI::Session::SQLite
For more information on module installation, please visit the detailed CPAN module installation guide.