Hash::Missing - a hash that warns when retrieving non-existent keys
use 5.010; use Hash::Missing; tie my %hash, 'Hash::Missing'; my $foo = $hash{foo}; # warns
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
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Hash-DefaultValue.
Hash::DefaultValue.
Toby Inkster <tobyink@cpan.org>.
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.
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.
To install Hash::DefaultValue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hash::DefaultValue
CPAN shell
perl -MCPAN -e shell install Hash::DefaultValue
For more information on module installation, please visit the detailed CPAN module installation guide.