line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Session::Driver; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# $Id: Driver.pm 216 2005-09-01 10:52:26Z sherzodr $ |
4
|
|
|
|
|
|
|
|
5
|
15
|
|
|
15
|
|
63
|
use strict; |
|
15
|
|
|
|
|
18
|
|
|
15
|
|
|
|
|
471
|
|
6
|
|
|
|
|
|
|
#use diagnostics; |
7
|
|
|
|
|
|
|
|
8
|
15
|
|
|
15
|
|
59
|
use Carp; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
672
|
|
9
|
15
|
|
|
15
|
|
71
|
use CGI::Session::ErrorHandler; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
4314
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$CGI::Session::Driver::VERSION = "4.0"; |
12
|
|
|
|
|
|
|
@CGI::Session::Driver::ISA = qw(CGI::Session::ErrorHandler); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
24
|
|
|
24
|
0
|
36
|
my $class = shift; |
16
|
24
|
|
|
|
|
41
|
my ($args) = @_; |
17
|
|
|
|
|
|
|
|
18
|
24
|
50
|
|
|
|
70
|
if ( $args ) { |
19
|
24
|
50
|
|
|
|
115
|
unless ( ref $args ) { |
20
|
0
|
|
|
|
|
0
|
croak "Invalid argument type passed to driver: " . Dumper($args); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} else { |
23
|
0
|
|
|
|
|
0
|
$args = {}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
24
|
|
|
|
|
64
|
my $self = bless ($args, $class); |
27
|
24
|
50
|
|
|
|
107
|
return $self->init ? $self : undef; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
sub init { 1 } |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub retrieve { |
33
|
0
|
|
|
0
|
1
|
|
croak "retrieve(): " . ref($_[0]) . " failed to implement this method!"; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub store { |
37
|
0
|
|
|
0
|
1
|
|
croak "store(): " . ref($_[0]) . " failed to implement this method!"; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub remove { |
41
|
0
|
|
|
0
|
1
|
|
croak "remove(): " . ref($_[0]) . " failed to implement this method!"; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub traverse { |
45
|
0
|
|
|
0
|
1
|
|
croak "traverse(): " . ref($_[0]) . " failed to implement this method!"; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub dump { |
49
|
0
|
|
|
0
|
0
|
|
require Data::Dumper; |
50
|
0
|
|
|
|
|
|
my $d = Data::Dumper->new([$_[0]], [ref $_[0]]); |
51
|
0
|
|
|
|
|
|
return $d->Dump; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__; |