Cache/Backend/Memory.pm

filter: Statementstmt 72.2% 13 / 18 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 4 totaltotal 51.5% 17 / 33 CC 2 SCAR 8.9
CC
2
Cov
65%
get
6.0
new
2.0
set
2.0
CRAP 2.4
« Cache/Choose/KeyRegexes.pm ↑ Summary Cache/Backend.pm »
1 #!/usr/bin/perl
2  
3 package Catalyst::Plugin::Cache::Backend::Memory;
4 2 ▶use Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use Storable qw/freeze thaw/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10
11 0 ▶sub new { bless {}, shift }
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
12  
13 0 ▶sub get { ${thaw($_[0]{$_[1]}) || return} };
Subroutine get: not called CC=2 SCAR=17.9
Pod undocumented
Condition0%0/2
thaw($_[0]{$_[1]}) || (return)
l!l
00
MC/DC0%0/1
thaw($_[0]{$_[1]}) || (return)
thaw($_[0]{$_[1]})
Truth table0%0/2
A
A= thaw($_[0]{$_[1]})
Aresult
11
00
14  
15 0 ▶sub set { $_[0]{$_[1]} = freeze(\$_[2]) };
Subroutine set: not called CC=1 SCAR=6.9
Pod undocumented
16  
17 0 ▶sub remove { delete $_[0]{$_[1]} };
Subroutine remove: not called CC=1 SCAR=6.9
Pod undocumented
18  
19 2 __PACKAGE__;
20  
21 __END__
« Cache/Choose/KeyRegexes.pm ↑ Summary Cache/Backend.pm »