);
our $VERSION = 0.04;
-
=head1 NAME
Hash::Util - A selection of general-utility hash subroutines
use Hash::Util qw(lock_keys unlock_keys
lock_value unlock_value
- lock_hash unlock_hash
- );
+ lock_hash unlock_hash);
%hash = (foo => 42, bar => 23);
lock_keys(%hash);
lock_hash (%hash);
unlock_hash(%hash);
-
=head1 DESCRIPTION
C<Hash::Util> contains special functions for manipulating hashes that
lock_keys(%hash);
lock_keys(%hash, @keys);
- unlock_keys(%hash;)
-
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.
+ unlock_keys(%hash;)
+
Removes the restriction on the %hash's keyset.
=cut
=item B<unlock_hash>
lock_hash(%hash);
- unlock_hash(%hash);
lock_hash() locks an entire hash, making all keys and values readonly.
No value can be changed, no keys can be added or deleted.
-unlock_hash() does the opposite. All keys and values are made
-read/write. All values can be changed and keys can be added and
-deleted.
+ unlock_hash(%hash);
+
+unlock_hash() does the opposite of lock_hash(). All keys and values
+are made read/write. All values can be changed and keys can be added
+and deleted.
=cut