contrib (apache-session-nosql): modules could now not loaded at compilation time
This commit is contained in:
parent
be742cfac6
commit
aea883be1d
@ -3,8 +3,6 @@ package Apache::Session::Store::NoSQL;
|
|||||||
use strict;
|
use strict;
|
||||||
use vars qw(@ISA $VERSION);
|
use vars qw(@ISA $VERSION);
|
||||||
|
|
||||||
use Apache::Session::Store::NoSQL::Cassandra;
|
|
||||||
|
|
||||||
$VERSION = '0.01';
|
$VERSION = '0.01';
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
@ -12,8 +10,15 @@ sub new {
|
|||||||
my $self;
|
my $self;
|
||||||
|
|
||||||
if ( $session->{args}->{Driver} ) {
|
if ( $session->{args}->{Driver} ) {
|
||||||
my $module = 'Apache::Session::Store::NoSQL::' . $session->{args}->{Driver};
|
my $module = 'Apache::Session::Store::NoSQL::'
|
||||||
$self->{cache} = new $module;
|
. $session->{args}->{Driver};
|
||||||
|
eval "require $module";
|
||||||
|
if ($@) {
|
||||||
|
die 'Unable to load ' . $module;
|
||||||
|
}
|
||||||
|
unless ( $self->{cache} = new $module ) {
|
||||||
|
die 'Unable to instanciate ' . $module;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
die 'No driver specified.';
|
die 'No driver specified.';
|
||||||
|
Loading…
Reference in New Issue
Block a user