From: Jarkko Hietaniemi Date: Sun, 27 Apr 2003 06:03:48 +0000 (+0000) Subject: Document that restricted hashes are not atomic X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13cd91152e7bdb516cdbab439bbb14bf630eda75;p=p5sagit%2Fp5-mst-13.2.git Document that restricted hashes are not atomic (from Dave Mitchell). p4raw-id: //depot/perl@19346 --- diff --git a/lib/Hash/Util.pm b/lib/Hash/Util.pm index 90a8e5a..c7350f6 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