I'm using Hash::Util
's lock_keys
to die whenever trying to access a non-existing key in a hash.
Sometimes my hashes are deep (hash of hashes of hashes...). Is there a quick method to lock them all at once?
Is it possible to control the default message upon failure (i.e. add a Dump of the hash in which the key wasn't found)
lock_hash_recurse
Catch the exception, then dump as you wish and rethrow.
Question 2 is possible, but you are at the whims of the Hash::Util author(s):