File/Driver/FreezeThaw.pm

filter: Statementstmt 29.1% 7 / 24 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 40.0% 2 / 5 Podpod 66.6% 2 / 3 totaltotal 25.0% 11 / 44 CC 6 SCAR 24.8
CC
6
Cov
21%
freeze
20.0
thaw
12.0
new
2.0
CRAP 12.0
↑ Summary File.pm »
1 package MojoX::Session::Store::File::Driver::FreezeThaw;
2  
3 1 ▶use base 'MojoX::Session::Store::File::Driver';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use FreezeThaw;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
8 0 my $class = shift;
9  
10 0 bless $class->SUPER::new(@_), $class;
11 }
12  
13 0 ▶sub freeze {
Subroutine freeze: not called CC=4 SCAR=30.0
Pod documented
14 0 my $self = shift;
15  
16 0 my($file, $ref) = @_;
17 0 ▶ $ref = \$ref unless ref $ref;
Branch: 1 branch
BranchTrueFalseTotal
unless ref $ref 0 0 0
18  
19 0 ▶ my $frozen = FreezeThaw::freeze($ref) || return;
Condition0%0/2
FreezeThaw::freeze($ref) || (return)
l!l
00
MC/DC0%0/1
FreezeThaw::freeze($ref) || (return)
FreezeThaw::freeze($ref)
Truth table0%0/2
A
A= FreezeThaw::freeze($ref)
Aresult
11
00
20 0 ▶ open my $fh, '>', $file or return;
Branch: 1 branch
BranchTrueFalseTotal
open my $fh, ">", $file or return 0 0 0
21 0 print $fh $frozen;
22 0 close $fh;
23  
24 0 1;
25 }
26  
27 0 ▶sub thaw {
Subroutine thaw: not called CC=3 SCAR=24.8
Pod documented
28 0 my $self = shift;
29  
30 0 my $file = shift;
31  
32 0 ▶ open my $fh, '<', $file or return;
Branch: 1 branch
BranchTrueFalseTotal
open my $fh, "<", $file or return 0 0 0
33 0 local $/;
34 0 ▶ my $thawed = FreezeThaw::thaw(<$fh>) || return;
Condition0%0/2
FreezeThaw::thaw(readline $fh) || (return)
l!l
00
MC/DC0%0/1
FreezeThaw::thaw(readline $fh) || (return)
FreezeThaw::thaw(readline $fh)
Truth table0%0/2
A
A= FreezeThaw::thaw(readline $fh)
Aresult
11
00
35 0 close $fh;
36  
37 0 $thawed;
38 }
39  
40 1 1;
↑ Summary File.pm »