Kazuhiro Oinuma > CGI-Session-Driver-aggregator-0.03 > CGI::Session::Driver::aggregator::Drivers

Download:
CGI-Session-Driver-aggregator-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

 CGI::Session::Driver::aggregator::Drivers - Drivers container for CGI::Session::Driver::aggregator

METHODS ^

add($driver_name, $driver_arguments)

Adding a driver with extra arguments. driver_arguments will be used to instanctiate the driver. The driver must be an instance of CGI::Session::Driver.

 $drivers = CGI::Session::Driver::aggregator::Drivers->new;
 $drivers->add('file', { Directory => '/tmp' });
 $drivers->add('mysql', { Handle => $dbh });

NOTE: session data is read from drivers in the added order. In above example, reading from 'file' first, and then from 'mysql' (only when cannot read from 'file'). On the other hand, When writing session data, the order is 'mysql' -> 'file'.