our @EXPORT_OK = qw(lock_keys unlock_keys lock_value unlock_value
lock_hash unlock_hash
);
-our $VERSION = 0.04;
+our $VERSION = 0.05;
=head1 NAME
Restricts the given %hash's set of keys to @keys. If @keys is not
given it restricts it to its current keyset. No more keys can be
-added. delete() and exists() will still work, but it does not effect
-the set of allowed keys.
+added. delete() and exists() will still work, but will not alter
+the set of allowed keys. B<Note>: the current implementation prevents
+the hash from being bless()ed while it is in a locked state. Any attempt
+to do so will raise an exception. Of course you can still bless()
+the hash before you call lock_keys() so this shouldn't be a problem.
unlock_keys(%hash);
=back
+=head1 CAVEATS
+
+Note that the trapping of the restricted operations is not atomic:
+for example
+
+ eval { %hash = (illegal_key => 1) }
+
+leaves the C<%hash> empty rather than with its original contents.
+
=head1 AUTHOR
Michael G Schwern <schwern@pobox.com> on top of code by Nick