Checking in breakout of the various packages in DBM::Deep::Engine and documentation...
[dbsrgits/DBM-Deep.git] / lib / DBM / Deep / Null.pm
CommitLineData
f0276afb 1# This was copied from MARCEL's Class::Null. However, I couldn't use it because
2# I need an undef value, not an implementation of the Null Class pattern.
3package DBM::Deep::Null;
4
5use 5.006_000;
6
7use strict;
8use warnings FATAL => 'all';
9
10=head1 NAME
11
12DBM::Deep::Null
13
14=head1 PURPOSE
15
16This is an internal-use-only object for L<DBM::Deep/>. It acts as a NULL object
17in the same vein as MARCEL's L<Class::Null/>. I couldn't use L<Class::Null/>
18because DBM::Deep needed an object that always evaluated as undef, not an
19implementation of the Null Class pattern.
20
21=head1 OVERVIEW
22
23It is used to represent null sectors in DBM::Deep.
24
25=cut
26
27use overload
28 'bool' => sub { undef },
29 '""' => sub { undef },
30 '0+' => sub { undef },
31 fallback => 1,
32 nomethod => 'AUTOLOAD';
33
34sub AUTOLOAD { return; }
35
361;
37__END__