MojoX::Session::Store::Dbi - Dbi Store for MojoX::Session
CREATE TABLE session ( sid VARCHAR(40) PRIMARY KEY, data TEXT, expires INTEGER UNSIGNED NOT NULL, UNIQUE(sid) ); my $session = MojoX::Session->new( store => MojoX::Session::Store::Dbi->new(dbh => $dbh), ... );
MojoX::Session::Store::Dbi is a store for MojoX::Session that stores a session in a database.
MojoX::Session::Store::Dbi implements the following attributes.
dbh
my $dbh = $store->dbh; $store = $store->dbh($dbh);
Get and set dbh handler.
table
Table name. Default is 'session'.
sid_column
Session id column name. Default is 'sid'.
expires_column
Expires column name. Default is 'expires'.
data_column
Data column name. Default is 'data'.
MojoX::Session::Store::Dbi inherits all methods from MojoX::Session::Store.
create
Insert session to database.
update
Update session in database.
load
Load session from database.
delete
Delete session from database.
vti, vti@cpan.org.
vti@cpan.org
Copyright (C) 2008, Viacheslav Tykhanovskyi.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.
To install MojoX::Session, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MojoX::Session
CPAN shell
perl -MCPAN -e shell install MojoX::Session
For more information on module installation, please visit the detailed CPAN module installation guide.