line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
############################################################################# |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Apache::Session::Serialize::Dumper |
4
|
|
|
|
|
|
|
# Serializes session objects using Data::Dumper |
5
|
|
|
|
|
|
|
# Copyright(c) 2000 Pascal Fleury (fleury@users.sourceforge.net) |
6
|
|
|
|
|
|
|
# Distribute under the Artistic License |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
############################################################################ |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package Apache::Session::Serialize::Dumper; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
706
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
13
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
14
|
1
|
|
|
1
|
|
581917
|
use Data::Dumper; |
|
1
|
|
|
|
|
12618
|
|
|
1
|
|
|
|
|
248
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$VERSION = "0.90"; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub serialize { |
19
|
1
|
|
|
1
|
0
|
67
|
my $session = shift; |
20
|
1
|
|
|
|
|
3
|
local $Data::Dump::Purity = 1; |
21
|
1
|
|
|
|
|
2
|
local $Data::Dumper::Varname = "ASSD"; |
22
|
1
|
|
|
|
|
8
|
$session->{serialized} = Dumper( $session->{data} ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub unserialize { |
26
|
1
|
|
|
1
|
0
|
164
|
my $session = shift; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
1
|
my $ASSD1; |
29
|
1
|
|
|
|
|
98
|
eval $session->{serialized}; |
30
|
1
|
|
|
|
|
5
|
$session->{data} = $ASSD1; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Apache::Session::Serialize::Dumper - Use Data::Dumper to zip up persistent data |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
use Apache::Session::Serialize::Dumper; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
$zipped = Apache::Session::Serialize::Dumper::serialize($ref); |
46
|
|
|
|
|
|
|
$ref = Apache::Session::Serialize::Dumper::unserialize($zipped); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This module fulfills the serialization interface of Apache::Session. |
51
|
|
|
|
|
|
|
It serializes the data in the session object by use of Data::Dumper's |
52
|
|
|
|
|
|
|
C and Perl's C functions. The result is a text object |
53
|
|
|
|
|
|
|
ready for storage. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This module was written by Pascal Fleury . |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SEE ALSO |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L |
62
|
|
|
|
|
|
|
L, |
63
|
|
|
|
|
|
|
L, |
64
|
|
|
|
|
|
|
L |