CGI::Session::MySQL - MySQL driver for CGI::Session
use CGI::Session qw/-api3/; $session = new CGI::Session("driver:MySQL", undef, {Handle=>$dbh});
For more examples, consult CGI::Session manual
CGI::Session::MySQL is a CGI::Session driver to store session data in MySQL table. To write your own drivers for CGI::Session refere CGI::Session manual.
To store session data in MySQL database, you first need to create a suitable table for it with the following command:
CREATE TABLE sessions ( id CHAR(32) NOT NULL, 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::MySQL::TABLE_NAME to the name of the table:
use CGI::Session qw/-api3/; $CGI::Session::MySQL::TABLE_NAME = 'my_sessions'; $session = new CGI::Session("driver:MySQL", undef, {Handle=>$dbh});
Copyright (C) 2001, 2002 Sherzod Ruzmetov. All rights reserved.
This library is free software and can be modified and distributed under the same terms as Perl itself.
Your name=pod
CGI::Session::BluePrint - Default CGI::Session driver BluePrint
use CGI::Session::BluePrint $session = new CGI::Session("driver:BluePrint", undef, {...});
CGI::Session::BluePrint is a CGI::Session driver. To write your own drivers for CGI::Session refere CGI::Session manual.
Copyright (C) 2002 Your Name. All rights reserved.
Sherzod Ruzmetov <sherzodr@cpan.org>. All the bug reports should be sent to the author to sherzodr@cpan.org>
CGI::Session CGI::Session::MySQL CGI::Session::DB_File CGI::Session::BerkelyDB
To install CGI::Session, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Session
CPAN shell
perl -MCPAN -e shell install CGI::Session
For more information on module installation, please visit the detailed CPAN module installation guide.