line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MojoX::Session::Store::File::Driver::FreezeThaw; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1405
|
use base 'MojoX::Session::Store::File::Driver'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
96
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1171
|
use FreezeThaw; |
|
1
|
|
|
|
|
5450
|
|
|
1
|
|
|
|
|
211
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
|
|
|
bless $class->SUPER::new(@_), $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub freeze { |
14
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my($file, $ref) = @_; |
17
|
0
|
0
|
|
|
|
|
$ref = \$ref unless ref $ref; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
0
|
|
|
|
my $frozen = FreezeThaw::freeze($ref) || return; |
20
|
0
|
0
|
|
|
|
|
open my $fh, '>', $file or return; |
21
|
0
|
|
|
|
|
|
print $fh $frozen; |
22
|
0
|
|
|
|
|
|
close $fh; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub thaw { |
28
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $file = shift; |
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
open my $fh, '<', $file or return; |
33
|
0
|
|
|
|
|
|
local $/; |
34
|
0
|
|
0
|
|
|
|
my $thawed = FreezeThaw::thaw(<$fh>) || return; |
35
|
0
|
|
|
|
|
|
close $fh; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
$thawed; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |