Session/Driver.pm

filter: Statementstmt 42.8% 12 / 28 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 30.0% 3 / 10 Podpod 71.4% 5 / 7 totaltotal 39.2% 20 / 51 SCAR 21.2
CC
4
Cov
35%
new
20.0
init
2.0
retrieve
2.0
CRAP 8.3
« Session/ID/incr.pm ↑ Summary Session/ID/static.pm »
1 package CGI::Session::Driver;
2  
3 # $Id: Driver.pm 216 2005-09-01 10:52:26Z sherzodr $
4  
5 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 #use diagnostics;
7  
8 14 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 14 ▶use CGI::Session::ErrorHandler;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 14 $CGI::Session::Driver::VERSION = "4.0";
12 14 @CGI::Session::Driver::ISA = qw(CGI::Session::ErrorHandler);
13  
14 sub new {
15 0 ▶ my $class = shift;
Subroutine new: not called CC=4 SCAR=30.0
Pod undocumented
16 0 my ($args) = @_;
17  
18 0 ▶ if ( $args ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($args) { } 0 0 0
19 0 ▶ unless ( ref $args ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $args) 0 0 0
20 0 croak "Invalid argument type passed to driver: " . Dumper($args);
21 }
22 } else {
23 0 $args = {};
24 }
25  
26 0 my $self = bless ($args, $class);
27 0 ▶ return $self->init ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->init ? : 0 0 0
28 }
29  
30 0 ▶sub init { 1 }
Subroutine init: not called CC=1 SCAR=6.9
Pod documented
31  
32 sub retrieve {
33 0 ▶ croak "retrieve(): " . ref($_[0]) . " failed to implement this method!";
Subroutine retrieve: not called CC=1 SCAR=6.9
Pod documented
34 }
35  
36 sub store {
37 0 ▶ croak "store(): " . ref($_[0]) . " failed to implement this method!";
Subroutine store: not called CC=1 SCAR=6.9
Pod documented
38 }
39  
40 sub remove {
41 0 ▶ croak "remove(): " . ref($_[0]) . " failed to implement this method!";
Subroutine remove: not called CC=1 SCAR=6.9
Pod documented
42 }
43  
44 sub traverse {
45 0 ▶ croak "traverse(): " . ref($_[0]) . " failed to implement this method!";
Subroutine traverse: not called CC=1 SCAR=6.9
Pod documented
46 }
47  
48 sub dump {
49 0 ▶ require Data::Dumper;
Subroutine dump: not called CC=1 SCAR=6.9
Pod undocumented
50 0 my $d = Data::Dumper->new([$_[0]], [ref $_[0]]);
51 0 return $d->Dump;
52 }
53  
54  
55 14 1;
56  
57 __END__;
« Session/ID/incr.pm ↑ Summary Session/ID/static.pm »