lock_hash#

Lock the whole hash: both its keyset and every value.

Synopsis#

lock_hash(%hash);

Equivalent to lock_keys(%hash) followed by lock_value on each existing key. After the call, no key may be added and no value overwritten, and because every value is read-only, delete croaks with “Attempt to delete readonly key”.

Returns a reference to the hash.