From 13cd91152e7bdb516cdbab439bbb14bf630eda75 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 27 Apr 2003 06:03:48 +0000 Subject: Document that restricted hashes are not atomic (from Dave Mitchell). p4raw-id: //depot/perl@19346 --- lib/Hash/Util.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') 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 on top of code by Nick -- cgit v1.2.1