Change 17992 by [EMAIL PROTECTED] on 2002/10/10 11:29:12 Subject: Re: Hash::Util::lock_keys inhibits bless From: [EMAIL PROTECTED] (Andreas J. Koenig) Date: Fri, 04 Oct 2002 06:38:57 +0200 Message-ID: <[EMAIL PROTECTED]>
Affected files ... .... //depot/perl/lib/Hash/Util.pm#7 edit Differences ... ==== //depot/perl/lib/Hash/Util.pm#7 (text) ==== Index: perl/lib/Hash/Util.pm --- perl/lib/Hash/Util.pm#6~17961~ Wed Oct 2 07:09:11 2002 +++ perl/lib/Hash/Util.pm Thu Oct 10 04:29:12 2002 @@ -59,10 +59,11 @@ 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. B<Note>: the current implementation does not -allow you to bless() the resulting hash, so if you want to use -lock_keys() for an object, you need to bless it prior to locking it. +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); End of Patch.