Catalyst::Plugin::Session::Store::DODStore your sessions in a database using Data::ObjectDriver. | |
Download |
Catalyst::Plugin::Session::Store::DOD Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- David Recordon
- Publisher web site:
- http://search.cpan.org/~recordond/
Catalyst::Plugin::Session::Store::DOD Tags
Catalyst::Plugin::Session::Store::DOD Description
Store your sessions in a database using Data::ObjectDriver. Catalyst::Plugin::Session::Store::DOD is a Perl module to store your sessions in a database using Data::ObjectDriver.SYNOPSIS # Create a table in your database for sessions CREATE TABLE sessions ( id char(72) primary key, session_data text, expires int(10) ); # Create a Data::ObjectDriver model package BaseObject::M::Session; use base qw( Data::ObjectDriver::BaseObject ); use Data::ObjectDriver::Driver::DBI; __PACKAGE__->install_properties({ columns => , primary_key => , datasource => 'sessions', get_driver => sub { Data::ObjectDriver::Driver::DBI->new( dsn => "dbi:SQLite:session.db", ), }, }); # In your app use Catalyst qw/Session Session::Store::DOD Session::State::Cookie/; # Connect directly to the database MyApp->config->{session} = { expires => 3600, model => "BaseObject::M::Session", }; # ... in an action: $c->session->{foo} = 'bar'; # will be savedThis storage module will store session data in a database using a Data::ObjectDriver model. It is based on version 0.13 of Catalyst::Plugin::Session::Store::DBI by Andy Grundman and is basically a port of his module to use D::OD instead of directly interacting via DBI. Requirements: · Perl
Catalyst::Plugin::Session::Store::DOD Related Software