StorableDir/BackedScalar.pm

filter: Statementstmt 54.5% 12 / 22 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 57.1% 4 / 7 Podpod n/a totaltotal 47.0% 16 / 34 CC 2 SCAR 9.2
CC
2
Cov
48%
TIESCALAR
6.0
FETCH
2.0
STORE
2.0
CRAP 2.5
« StorableDir/Slot.pm ↑ Summary StorableDir/BackedHash.pm »
1 package Tie::StorableDir::BackedScalar;
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::Scalar';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶sub TIESCALAR {
Subroutine TIESCALAR: not called CC=2 SCAR=17.9
10 0 my ($class, $parent, $backing) = @_;
11 0 ▶ $class = ref $class || $class;
Condition0%0/3
ref $class || $class
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table0%0/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
12 0 my $self = [$backing, $parent];
13 0 bless $self, $class;
14 0 return $self;
15 }
16  
17 0 ▶sub FETCH {
Subroutine FETCH: not called CC=1 SCAR=6.9
18 0 my ($self) = @_;
19 0 return $self->[1]->translate(${$self->[0]});
20 }
21  
22 0 ▶sub STORE {
Subroutine STORE: not called CC=1 SCAR=6.9
23 0 my ($self, $value) = @_;
24 0 $self->[0] = $value;
25 }
26  
27 4 1;
« StorableDir/Slot.pm ↑ Summary StorableDir/BackedHash.pm »