develooper Front page | perl.perl5.porters | Postings from January 2012

Re: [perl #47948] [documentation] Hash::Util::FieldHash

Thread Previous | Thread Next
David Golden
January 12, 2012 18:38
Re: [perl #47948] [documentation] Hash::Util::FieldHash
Message ID:
On Thu, Jan 12, 2012 at 9:08 PM, Father Chrysostomos via RT
<> wrote:
> My question is: Why is it unsafe at all to create or delete things from
> a hash that is being iterated?

Here is the relevant MJD post, I think:

> There have been at least three fixes to the deletion code since 5.14.
> Could it have anything to do with those?

MJD looks like it was legacy Larry code that had the problem.

I think it's all to avoid requiring two passes.

Should it be (now or in the future) safe to delete arbitrary keys
during iteration, then the same would apply to inside-out object

-- David

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About