line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Session::Serialize::storable; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# $Id$ |
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
22
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
161
|
|
6
|
4
|
|
|
4
|
|
23
|
use Storable; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
965
|
|
7
|
|
|
|
|
|
|
require CGI::Session::ErrorHandler; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$CGI::Session::Serialize::storable::VERSION = '4.43'; |
10
|
|
|
|
|
|
|
@CGI::Session::Serialize::storable::ISA = ( "CGI::Session::ErrorHandler" ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=pod |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
CGI::Session::Serialize::storable - Serializer for CGI::Session |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This library can be used by CGI::Session to serialize session data. Uses L<Storable|Storable>. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 METHODS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=over 4 |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=item freeze($class, \%hash) |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Receives two arguments. First is the class name, the second is the data to be serialized. |
29
|
|
|
|
|
|
|
Should return serialized string on success, undef on failure. Error message should be set using |
30
|
|
|
|
|
|
|
C<set_error()|CGI::Session::ErrorHandler/"set_error()"> |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub freeze { |
35
|
8
|
|
|
8
|
1
|
19
|
my ($self, $data) = @_; |
36
|
8
|
|
|
|
|
46
|
return Storable::freeze($data); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item thaw($class, $string) |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Receives two arguments. First is the class name, second is the I<frozen> data string. Should return |
42
|
|
|
|
|
|
|
thawed data structure on success, undef on failure. Error message should be set |
43
|
|
|
|
|
|
|
using C<set_error()|CGI::Session::ErrorHandler/"set_error()"> |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=back |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub thaw { |
50
|
7
|
|
|
7
|
1
|
19
|
my ($self, $string) = @_; |
51
|
7
|
|
|
|
|
42
|
return Storable::thaw($string); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 LICENSING |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
For support and licensing see L<CGI::Session|CGI::Session> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |