About FAQ 3-13 (perl & db2)

Andrew Pimlott pimlott@MATH.HARVARD.EDU
Thu Dec 2 22:19:00 GMT 1999


On Thu, 2 Dec 1999, Michael Deutschmann wrote:

> I've run into the testsuite failure problem on perl (anydbm wants to use 
> null size keys, which db2 doesn't allow) documented in the FAQ.

I believe there was some discussion between perl guys and db guys on the
perl5porters mailing list, at least many months ago.  I recall the db guys
being surprised that anyone wanted null string keys, and the perl guys
making some headway at convincing them it is a reasonable thing to want. I
don't know whether it got any further, though the db guys didn't have any
paying customers clamoring for it.

db 3 was just released, so you could see whether the issue was addressed
there.  (I think db 3 changed the compatibility interface a tad, so
DB_File may not compile out-of-box.)

> Question is, what do I *do* about it???

umum

(That means I don't have a blessed or pretty solution.)

How badly do you need null string keys?  You could write a perl wrapper
class around DB_File that does something silly like prepend a character to
every key before storing it, and strip it after retrieving.  You could
directly modify DB_File in either perl or C to do the same thing (and make
it run-time configurable, and send it to p5p).  You could address the root
of the problem in db, which can't be that hard.

Andrew



More information about the Libc-alpha mailing list