The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CGI::Session::Driver::dbic - DBIx::Class storage driver for CGI::Session.

VERSION

Version 1.01

SYNOPSIS

    use CGI::Session;

    my $schema = MyDB::Schema->connect($dbi_dsn, $user, $pass, \%dbi_params);
    my $dbic_rs = $schema->resultset('sessions');

    my $s = CGI::Session->new("driver:dbic", undef, {ResultSet => $dbic_rs});
    ...

STORAGE

The structure of the table is the same as in CGI::Session::Driver::DBI.

    CREATE TABLE sessions (
        id CHAR(32) NOT NULL PRIMARY KEY,
        a_session TEXT NOT NULL
    );

DBIx::Class schema:

    package MyProject::DB::Session;
    use base qw/DBIx::Class/;

    __PACKAGE__->load_components(qw/Core/);
    __PACKAGE__->table('sessions');
    __PACKAGE__->add_columns(
        id        => { data_type => 'char', size => 32 },
        a_session => { data_type => 'bytea' },
    );
    __PACKAGE__->set_primary_key('id');

    1;

DRIVER ARGUMENTS

Following driver arguments are supported:

ResultSet

DBIx::Class::ResultSet for sessions table.

AUTHOR

Sergey Homenkow, <shomenkow at gmail.com>

BUGS

Please report any bugs or feature requests to bug-cgi-session-driver-dbic at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Session-Driver-dbic. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc CGI::Session::Driver::dbic

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2010 Sergey Homenkow.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.