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