[Samba] announce: TDB_File.pm
Angus Lees
gus at inodes.org
Mon Jul 1 16:52:02 GMT 2002
[apologies to the samba list if you aren't interested in this]
I've rewritten the TDB perl bindings from scratch.
this version:
* is on CPAN (http://search.cpan.org/search?mode=module&query=TDB_File)
* supports 8-bit keys and values
* gives access to the complete TDB API
Feel free to include/reference in the TDB distribution (or ignore
completely, of course ;)
A few comments after having done so:
nice, clean and simple. it was almost an ideal library to provide XS
bindings for.
the logging_function callback should perhaps have a void *state
argument for "instance data" too. (although it would probably never be
used by C code). I'm going to have to look up the TDB_CONTEXT address
in a hash (or something) to provide this myself.
tdb_reopen() closes the database on error, which means (amongst other
things) that you can't call tdb_error() to find out what went wrong
(you have to use a logging callback).
tdb_reopen_all() returns no indication of *which* reopen failed. when
combined with tdb_reopen()'s auto-close-on-error, this makes
tdb_reopen_all() almost useless.
--
- Gus
More information about the samba
mailing list