blib/lib/DBM/Deep/Null.pm

filter: Statementstmt 75.0% 12 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod n/a totaltotal 66.6% 16 / 24 CC 1 SCAR 4.1
CC
1
Cov
75%
__ANON__
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.5
« blib/lib/DBM/Deep/Storage.pm ↑ Summary blib/lib/DBM/Deep/Iterator.pm »
1 package DBM::Deep::Null;
2  
3 47 ▶use 5.006_000;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 47 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 47 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 DBM::Deep::Null
11  
12 =head1 PURPOSE
13  
14 This is an internal-use-only object for L<DBM::Deep>. It acts as a NULL object
15 in the same vein as MARCEL's L<Class::Null>. I couldn't use L<Class::Null>
16 because DBM::Deep needed an object that always evaluated as undef, not an
17 implementation of the Null Class pattern.
18  
19 =head1 OVERVIEW
20  
21 It is used to represent null sectors in DBM::Deep.
22  
23 =cut
24  
25 use overload
26 0 ▶ 'bool' => sub { undef },
Subroutine __ANON__: not called CC=1 SCAR=6.9
27 0 ▶ '""' => sub { undef },
Subroutine __ANON__: not called CC=1 SCAR=6.9
28 0 ▶ '0+' => sub { 0 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
29 47 fallback => 1,
30 47 ▶ nomethod => 'AUTOLOAD';
Subroutine BEGIN: called CC=1 SCAR=0.0
31  
32 0 ▶sub AUTOLOAD { return; }
Subroutine AUTOLOAD: not called CC=1 SCAR=6.9
33  
34 47 1;
35 __END__
« blib/lib/DBM/Deep/Storage.pm ↑ Summary blib/lib/DBM/Deep/Iterator.pm »