| 1 | package CGI::Session::Driver; | ||||||||||||
| 2 | |||||||||||||
| 3 | 24 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | # | ||||||||||||
| 5 | |||||||||||||
| 6 | 24 | ▶ | use Carp; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 24 | ▶ | use CGI::Session::ErrorHandler; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 24 | $CGI::Session::Driver::VERSION = '4.43'; | |||||||||||
| 10 | 24 | @CGI::Session::Driver::ISA = qw(CGI::Session::ErrorHandler); | |||||||||||
| 11 | |||||||||||||
| 12 | 48 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=7 SCAR=20.0
Pod
undocumented
| |||||||||||||
| 13 | 48 | my $class = shift; | |||||||||||
| 14 | 48 | ▶ | my $args = shift || {}; | ||||||||||
|
Condition50%1/2
shift() || {}
MC/DC0%0/1
shift() || {}
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||
| 15 | |||||||||||||
| 16 | 48 | ▶ | unless ( ref $args ) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 17 | 0 | croak "$class->new(): Invalid argument type passed to driver"; | |||||||||||
| 18 | } | ||||||||||||
| 19 | |||||||||||||
| 20 | # Set defaults. | ||||||||||||
| 21 | |||||||||||||
| 22 | 48 | ▶ | if (! $args->{TableName}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 23 | 32 | $args->{TableName} = 'sessions'; | |||||||||||
| 24 | } | ||||||||||||
| 25 | |||||||||||||
| 26 | 48 | ▶ | if (! $args->{IdColName}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 27 | 32 | $args->{IdColName} = 'id'; | |||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | 48 | ▶ | if (! $args->{DataColName}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 31 | 32 | $args->{DataColName} = 'a_session'; | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | # perform a shallow copy of $args, to prevent modification | ||||||||||||
| 35 | 48 | my $self = bless ({%$args}, $class); | |||||||||||
| 36 | 48 | ▶ | return $self if $self->init(); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 37 | 0 | return $self->set_error( "$class->init() returned false"); | |||||||||||
| 38 | } | ||||||||||||
| 39 | |||||||||||||
| 40 | 0 | ▶ | sub init { 1 } | ||||||||||
|
Subroutine
init: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 41 | |||||||||||||
| 42 | 0 | ▶ | sub retrieve { | ||||||||||
|
Subroutine
retrieve: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 43 | 0 | croak "retrieve(): " . ref($_[0]) . " failed to implement this method!"; | |||||||||||
| 44 | } | ||||||||||||
| 45 | |||||||||||||
| 46 | 0 | ▶ | sub store { | ||||||||||
|
Subroutine
store: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 47 | 0 | croak "store(): " . ref($_[0]) . " failed to implement this method!"; | |||||||||||
| 48 | } | ||||||||||||
| 49 | |||||||||||||
| 50 | 0 | ▶ | sub remove { | ||||||||||
|
Subroutine
remove: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 51 | 0 | croak "remove(): " . ref($_[0]) . " failed to implement this method!"; | |||||||||||
| 52 | } | ||||||||||||
| 53 | |||||||||||||
| 54 | 0 | ▶ | sub traverse { | ||||||||||
|
Subroutine
traverse: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 55 | 0 | croak "traverse(): " . ref($_[0]) . " failed to implement this method!"; | |||||||||||
| 56 | } | ||||||||||||
| 57 | |||||||||||||
| 58 | 0 | ▶ | sub dump { | ||||||||||
|
Subroutine
dump: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 59 | 0 | require Data::Dumper; | |||||||||||
| 60 | 0 | my $d = Data::Dumper->new([$_[0]], [ref $_[0]]); | |||||||||||
| 61 | 0 | return $d->Dump; | |||||||||||
| 62 | } | ||||||||||||
| 63 | |||||||||||||
| 64 | |||||||||||||
| 65 | 24 | 1; | |||||||||||
| 66 | |||||||||||||
| 67 | __END__; | ||||||||||||