develooper Front page | perl.perl5.porters | Postings from December 2017

Re: [perl #117449] GDBM tied hash weirdness; deletion ends 'each'loop

December 15, 2017 09:56
Re: [perl #117449] GDBM tied hash weirdness; deletion ends 'each'loop
Message ID:
This weirdness arises because deleting from a gdbm hash can reorganise
the hash.  Unlike Perl's own hashes, gdbm has no exception for deleting
the current entry.  This is explained at some length in the gdbm
documentation.  It is therefore impossible to make such deletion work as
desired, without making GDBM_File a far thicker layer over libgdbm than
it is clearly intended to be.  I have put a note about this issue in the
GDBM_File documention in commit 3752113a3158d060bec97da2512b1549afb5b4c7.

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