blib/lib/Geo/UK/Postcode/Regex/Hash.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 81.2% 13 / 16 SCAR 6.9
CC
2
Cov
92%
FETCH
2.0
TIEHASH
1.0
CRAP 2.0
« blib/lib/auto/share/dist/Geo-UK-Postcode-Regex/get_pc_districts.pl ↑ Summary Build »
1 package Geo::UK::Postcode::Regex::Hash;
2  
3 7 our $VERSION = '0.015';
4  
5 7 require Tie::Hash;
6  
7 7 our @ISA = qw/ Tie::StdHash /;
8  
9 sub TIEHASH {
10 7 ▶ my $class = shift;
Subroutine TIEHASH: called CC=1 SCAR=0.0
11 7 return bless {@_}, $class;
12 }
13  
14 sub FETCH {
15 34148 ▶ my ( $this, $key ) = @_;
Subroutine FETCH: called CC=2 SCAR=7.0
16 34148 ▶ $this->{$key} //= $this->{_fetch}->($key);
Condition66%2/3
$this->{$key} //= $this->{"_fetch"}->($key)
l!l&&r!l&&!r
34070780
MC/DC0%0/2
$this->{$key} //= $this->{"_fetch"}->($key)
$this->{$key} $this->{"_fetch"}->($key)
Truth table66%2/3
A //= B
A= $this->{$key}B= $this->{"_fetch"}->($key)
ABresult
1X1
011
000
17 34148 return $this->{$key};
18 }
19  
20 7 1;
21  
« blib/lib/auto/share/dist/Geo-UK-Postcode-Regex/get_pc_districts.pl ↑ Summary Build »