NAME
Hash::Missing - a hash that warns when retrieving non-existent keys
SYNOPSIS
use 5.010;
use Hash::Missing;
tie my %hash, 'Hash::Missing';
my $foo = $hash{foo}; # warns
DESCRIPTION
This is a trivial subclass of Hash::DefaultValue. The example in the SYNOPSIS could be written:
use 5.010;
use Hash::DefaultValue;
tie my %hash, 'Hash::DefaultValue', sub {
carp "missing hash key: $_";
return undef;
};
my $foo = $hash{foo}; # warns
BUGS
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Hash-DefaultValue.
SEE ALSO
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCE
This software is copyright (c) 2012 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.