Memoize/NDBM_File.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Memoize/SDBM_File.pm ↑ Summary Memoize/AnyDBM_File.pm »
1 2 ▶use strict; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Memoize::NDBM_File;
4 our $VERSION = '1.17';
5  
6 0 ▶use NDBM_File;
Subroutine BEGIN: called CC=1 SCAR=2.6
7 our @ISA = qw(NDBM_File);
8  
9 # NDBM_File cannot store undef and will store an empty string if you try
10 # but it does return undef if you try to read a non-existent key
11 # so we can emulate exists() using defined()
12 sub EXISTS {
13 defined shift->FETCH(@_);
14 }
15  
16 # Perl 5.37.3 adds this EXISTS emulation to NDBM_File itself
17 delete $Memoize::NDBM_File::{'EXISTS'}
18 if eval { NDBM_File->VERSION( '1.16' ) };
19  
20 1;
21  
22 __END__
« Memoize/SDBM_File.pm ↑ Summary Memoize/AnyDBM_File.pm »