StorableDir/BackedHash.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 86.6% 26 / 30 CC 2 SCAR 2.7
CC
2
Cov
91%
TIEHASH
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« StorableDir/BackedScalar.pm ↑ Summary StorableDir/BackedArray.pm »
1 package Tie::StorableDir::BackedHash;
2  
3 4 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 ▶use base 'Tie::ExtraHash';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 8 ▶sub TIEHASH {
Subroutine TIEHASH: called CC=2 SCAR=7.2
10 8 my ($class, $parent, $backing) = @_;
11 8 ▶ $class = ref $class || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
080
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
12 8 my $self = [$backing, $parent];
13 8 bless $self, $class;
14 8 return $self;
15 }
16  
17 5 ▶sub FETCH {
Subroutine FETCH: called CC=1 SCAR=0.0
18 5 my ($self, $key) = @_;
19 5 return $self->[1]->translate($self->[0]{$key});
20 }
21  
22 4 1;
« StorableDir/BackedScalar.pm ↑ Summary StorableDir/BackedArray.pm »