MojoX::Session::Store::Dbic - DBIx::Class Store for MojoX::Session
CREATE TABLE session ( sid VARCHAR(40) PRIMARY KEY, data TEXT, expires INTEGER UNSIGNED NOT NULL, UNIQUE(sid) ); my $schema = DB->connect($dsn, $user, $pass, \%attr); my $rs = $schema->resultset('Session'); my $session = MojoX::Session->new( store => MojoX::Session::Store::Dbi->new(resultset => $rs), ... );
MojoX::Session::Store::Dbic is a store for MojoX::Session that stores a session in a database using DBIx::Class.
MojoX::Session::Store::Dbic implements the following attributes.
resultset
my $resultset = $store->resultset; $resultset = $store->resultset(resultset);
Get and set DBIx::Class::ResultSet object.
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::Dbic 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.
William Ono
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.