CGI::Session::Driver::aggregator - CGI::Session driver to aggregate some CGI::Session drivers.
use CGI::Session; use CGI::Session::Driver::aggregator::Drivers; use DBI; $dbh = DBI->connect('DBI:mysql:cgi_session;host=localhost', 'root', ''); $drivers = CGI::Session::Driver::aggregator::Drivers->new; $drivers->add('file', { Directory => '/tmp' }); $drivers->add('mysql', { Handle => $dbh }); $s = CGI::Session->new('driver:aggregator', $sid, { Drivers => $drivers }); $s->param(hey => 'Blur blur blur!'); # ----> Store datas into mysql and file!! $value = $s->param('hey'); # ----> Read datas from file (When cannot find, then from mysql)
aggregator stores session data into anything to be set up.
The only supported driver argument is 'Drivers'. It's an instance of CGI::Session::Driver::aggregator::Drivers.
Kazuhiro Oinuma <oinume@cpan.org>
Copyright (C) 2005 - 2006 Kazuhiro Oinuma <oinume@cpan.org>. All rights reserved. This library is free software. You can modify and or distribute it under the same terms as Perl itself.
To install CGI::Session::Driver::aggregator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Session::Driver::aggregator
CPAN shell
perl -MCPAN -e shell install CGI::Session::Driver::aggregator
For more information on module installation, please visit the detailed CPAN module installation guide.