line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Session::Serialize::Base64; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
784
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
2811
|
use Safe; |
|
1
|
|
|
|
|
43938
|
|
|
1
|
|
|
|
|
54
|
|
6
|
1
|
|
|
1
|
|
968
|
use MIME::Base64; |
|
1
|
|
|
|
|
753
|
|
|
1
|
|
|
|
|
93
|
|
7
|
1
|
|
|
1
|
|
1147
|
use Data::Dumper; |
|
1
|
|
|
|
|
17289
|
|
|
1
|
|
|
|
|
108
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
14
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
305
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
($VERSION) = '$Revision: 0.1 $' =~ m/Revision:\s*(\S+)/; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub freeze { |
15
|
0
|
|
|
0
|
1
|
|
my ($self, $data) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
local $Data::Dumper::Indent = 0; |
18
|
0
|
|
|
|
|
|
local $Data::Dumper::Purity = 0; |
19
|
0
|
|
|
|
|
|
local $Data::Dumper::Useqq = 1; |
20
|
0
|
|
|
|
|
|
local $Data::Dumper::Deepcopy = 0; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $d = new Data::Dumper([$data], ["D"]); |
23
|
0
|
|
|
|
|
|
return encode_base64($d->Dump()); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub thaw { |
29
|
0
|
|
|
0
|
1
|
|
my ($self, $Estring) = @_; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
my $string = decode_base64($Estring); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# To make -T happy |
34
|
0
|
|
|
|
|
|
my ($safe_string) = $string =~ m/^(.*)$/; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my $D = undef; |
37
|
0
|
|
|
|
|
|
my $cpt = new Safe(); |
38
|
0
|
|
|
|
|
|
$D = $cpt->reval ($safe_string ); |
39
|
0
|
0
|
|
|
|
|
if ( $@ ) { |
40
|
0
|
|
|
|
|
|
die $@; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
return $D; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |