summaryrefslogtreecommitdiff
path: root/lib/Hash
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-04-27 06:03:48 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-04-27 06:03:48 +0000
commit13cd91152e7bdb516cdbab439bbb14bf630eda75 (patch)
tree2cc403d84e80e7662a2df2127329ea1cdecffc95 /lib/Hash
parent34c3c4e3c36afb477dacf54a0d4557360c741870 (diff)
downloadperl-13cd91152e7bdb516cdbab439bbb14bf630eda75.tar.gz
Document that restricted hashes are not atomic
(from Dave Mitchell). p4raw-id: //depot/perl@19346
Diffstat (limited to 'lib/Hash')
-rw-r--r--lib/Hash/Util.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Hash/Util.pm b/lib/Hash/Util.pm
index 90a8e5aaa5..c7350f6593 100644
--- a/lib/Hash/Util.pm
+++ b/lib/Hash/Util.pm
@@ -178,6 +178,15 @@ sub unlock_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