Commit | Line | Data |
---|---|---|
065b45be | 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. | |
3 | package DBM::Deep::Null; | |
4 | ||
9c7d9738 | 5 | use 5.006_000; |
065b45be | 6 | |
7 | use strict; | |
8 | use warnings FATAL => 'all'; | |
9 | ||
10 | use overload | |
11 | 'bool' => sub { undef }, | |
12 | '""' => sub { undef }, | |
13 | '0+' => sub { undef }, | |
14 | fallback => 1, | |
15 | nomethod => 'AUTOLOAD'; | |
16 | ||
17 | sub AUTOLOAD { return; } | |
18 | ||
19 | 1; | |
20 | __END__ |