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