Leaky/State/Memory.pm

filter: Statementstmt 86.6% 13 / 15 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 5 / 5 totaltotal 86.6% 26 / 30 CC 2 SCAR 3.7
CC
2
Cov
88%
get
2.0
set
2.0
remove
2.0
CRAP 1.4
« Leaky/Driver/Q4M.pm ↑ Summary Leaky/Driver.pm »
1 package Queue::Leaky::State::Memory;
2  
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 with 'Queue::Leaky::State';
6  
7 has 'data' => (
8 is => 'rw',
9 isa => 'HashRef',
10 3 ▶ default => sub { +{} }
Subroutine __ANON__: called CC=1 SCAR=0.0
11 1 );
12  
13 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 ▶sub get { shift->data->{$_[0]} || 0 }
Subroutine get: called CC=2 SCAR=6.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
(shift())->data->{$_[0]} or 0 2 1 3
16 0 ▶sub set { shift->data->{$_[0]} = $_[1] }
Subroutine set: not called CC=1 SCAR=6.9
Pod documented
17 0 ▶sub remove { delete shift->data->{$_[0]} }
Subroutine remove: not called CC=1 SCAR=6.9
Pod documented
18  
19 8 ▶sub incr { ++shift->data->{$_[0]} }
Subroutine incr: called CC=1 SCAR=0.0
Pod documented
20 5 ▶sub decr { --shift->data->{$_[0]} }
Subroutine decr: called CC=1 SCAR=0.0
Pod documented
21  
22 1 1;
23  
24 __END__
« Leaky/Driver/Q4M.pm ↑ Summary Leaky/Driver.pm »