>>>>> "Andrew" == Andrew A Chen <[EMAIL PROTECTED]> writes:

Andrew> At 07:12 AM 1/6/2003, Randal L. Schwartz wrote:
>> Caveat executor, though.  delete is no longer promised to return the
>> deleted item(s), as it was in the "old days".  It just happens to work
>> for now.

Andrew> Ergh.  When's this going to stop working?  *looks at lotsa
Andrew> code to-be-broken*

The promise was removed in Perl5.000, since hashes can be tied.  It's
up to the author of the DELETE hook to "do the right thing".  That
cannot be promised, hence all bets are off.

Hmm.  As I stare at the 5.6 docs though, I see that perhaps I
misspoke.  I remember one of the joke comments that *was* going to go
in the docs was "deleting an element is not guaranteed not to invoke
nethack", for example.

Maybe the behavior is still promised for primitive hashes, but no
guarantee if the hash is tied.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to