Apache-Session-MariaDB
view release on metacpan or search on metacpan
lib/Apache/Session/Store/MariaDB.pm view on Meta::CPAN
if ( exists $session->{args}->{Handle} ) {
$self->{dbh} = $session->{args}->{Handle};
return;
}
my $datasource = $session->{args}->{DataSource}
|| $Apache::Session::Store::MariaDB::DataSource;
my $username = $session->{args}->{UserName}
|| $Apache::Session::Store::MariaDB::UserName;
my $password = $session->{args}->{Password}
|| $Apache::Session::Store::MariaDB::Password;
$self->{dbh} = DBI->connect( $datasource, $username, $password, { RaiseError => 1, AutoCommit => 1 } )
|| die $DBI::errstr;
#If we open the connection, we close the connection
$self->{disconnect} = 1;
}
sub DESTROY {
my $self = shift;
lib/Apache/Session/Store/MariaDB.pm view on Meta::CPAN
CREATE TABLE sessions (
id char(32) not null primary key,
a_session blob
);
If you use some other command, ensure that there is a unique index on the
table's id column.
=head1 CONFIGURATION
The module must know what datasource, username, and password to use when
connecting to the database. These values can be set using the options hash
(see Apache::Session documentation). The options are:
=over 4
=item DataSource
=item UserName
=item Password
( run in 0.492 second using v1.01-cache-2.11-cpan-49f99fa48dc )