File Coverage

blib/lib/Memoize/NDBM_File.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1 2     2   57128 use strict; use warnings;
  2     2   4  
  2         51  
  2         8  
  2         3  
  2         78  
2              
3             package Memoize::NDBM_File;
4             our $VERSION = '1.15';
5              
6 2     2   337 use NDBM_File;
  0            
  0            
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__