Store/NoSQL.pm

filter: Statementstmt 29.6% 8 / 27 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 28.5% 2 / 7 Podpod 0.0% 0 / 5 totaltotal 22.2% 10 / 45 CC 4 SCAR 22.0
CC
4
Cov
24%
new
20.0
insert
2.0
update
2.0
CRAP 9.0
↑ Summary Cassandra.pm »
1 package Apache::Session::Store::NoSQL;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw(@ISA $VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 $VERSION = '0.2';
7  
8 0 ▶sub new {
Subroutine new: not called CC=4 SCAR=30.0
Pod undocumented
9 0 my ( $class, $session ) = @_;
10 0 my $self;
11  
12 0 ▶ if ( $session->{args}->{Driver} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($session->{'args'}{'Driver'}) { } 0 0 0
13 my $module = 'Apache::Session::Store::NoSQL::'
14 0 . $session->{args}->{Driver};
15 0 eval "require $module";
16 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
17 0 die 'Unable to load ' . $module;
18 }
19 0 ▶ unless ( $self->{cache} = new $module ( $session ) ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"cache"} = $module->new($session)) 0 0 0
20 0 die 'Unable to instanciate ' . $module;
21 }
22 }
23 else {
24 0 die 'No driver specified.';
25 }
26  
27 0 bless $self,$class;
28 }
29  
30 0 ▶sub insert {
Subroutine insert: not called CC=1 SCAR=6.9
Pod undocumented
31 0 my ( $self, $session ) = @_;
32 0 $self->{cache}->insert( $session );
33 }
34  
35 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
Pod undocumented
36 0 my ( $self, $session ) = @_;
37 0 $self->{cache}->update( $session );
38 }
39  
40 0 ▶sub materialize {
Subroutine materialize: not called CC=1 SCAR=6.9
Pod undocumented
41 0 my ( $self, $session ) = @_;
42 0 $session->{serialized} = $self->{cache}->materialize( $session );
43 }
44  
45 0 ▶sub remove {
Subroutine remove: not called CC=1 SCAR=6.9
Pod undocumented
46 0 my ( $self, $session ) = @_;
47 0 $self->{cache}->remove( $session );
48 }
49  
50 1 1;
51  
52 __END__
↑ Summary Cassandra.pm »