line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Session::Serialize::Storable; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
891
|
use parent 'Data::Session::Base'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
4
|
1
|
|
|
1
|
|
88
|
no autovivification; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
5
|
1
|
|
|
1
|
|
61
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
735
|
use Storable; |
|
1
|
|
|
|
|
4032
|
|
|
1
|
|
|
|
|
243
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.18'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# ----------------------------------------------- |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub freeze |
15
|
|
|
|
|
|
|
{ |
16
|
16
|
|
|
16
|
0
|
55
|
my($self, $data) = @_; |
17
|
|
|
|
|
|
|
|
18
|
16
|
|
|
|
|
102
|
return Storable::freeze($data); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
} # End of freeze. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# ----------------------------------------------- |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new |
25
|
|
|
|
|
|
|
{ |
26
|
48
|
|
|
48
|
1
|
150
|
my($class) = @_; |
27
|
|
|
|
|
|
|
|
28
|
48
|
|
|
|
|
270
|
return bless({}, $class); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} # End of new. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# ----------------------------------------------- |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub thaw |
35
|
|
|
|
|
|
|
{ |
36
|
26
|
|
|
26
|
0
|
90
|
my($self, $data) = @_; |
37
|
|
|
|
|
|
|
|
38
|
26
|
|
|
|
|
152
|
return Storable::thaw($data); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
} # End of thaw. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# ----------------------------------------------- |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=pod |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 NAME |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
L - A persistent session manager |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 Synopsis |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
See L for details. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Warning: Storable should be avoided until this problem is fixed: |
57
|
|
|
|
|
|
|
L |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 Description |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L allows L to manipulate sessions with |
62
|
|
|
|
|
|
|
L. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
To use this module do this: |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over 4 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item o Specify a driver of type Storable as Data::Session -> new(type => '... serialize:Storable') |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=back |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 Case-sensitive Options |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
See L for important information. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 Method: new() |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Creates a new object of type L. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
C takes a hash of key/value pairs, some of which might mandatory. Further, some combinations |
81
|
|
|
|
|
|
|
might be mandatory. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
The keys are listed here in alphabetical order. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
They are lower-case because they are (also) method names, meaning they can be called to set or get |
86
|
|
|
|
|
|
|
the value at any time. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=over 4 |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item o verbose => $integer |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Print to STDERR more or less information. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Typical values are 0, 1 and 2. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This key is normally passed in as Data::Session -> new(verbose => $integer). |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This key is optional. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=back |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 Method: freeze($data) |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Returns $data frozen by L. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 Method: thaw($data) |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Returns $data thawed by L. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 Support |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Log a bug on RT: L. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 Author |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
L was written by Ron Savage Iron@savage.net.auE> in 2010. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Home page: L. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 Copyright |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Australian copyright (c) 2010, Ron Savage. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
All Programs of mine are 'OSI Certified Open Source Software'; |
125
|
|
|
|
|
|
|
you can redistribute them and/or modify them under the terms of |
126
|
|
|
|
|
|
|
The Artistic License, a copy of which is available at: |
127
|
|
|
|
|
|
|
http://www.opensource.org/licenses/index.html |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |