TDB
TDB is the tiny database from the Samba project. This contrib bundles it to make it easily installable for use with other TWiki extensions.
This Contrib installs a derivative of the
Samba TDB (tiny database). This is
a small, lightweight, reasonably fast database coded in C, that also happens
to be very useable from Perl. The TDB shipped with this Contrib is
a hybrid of
tdb-1.0.6
and the tdb used by
samba-3.0.21c
. This was required
because the developers of these packages have not kept them synchronised.
The package also includes all the header files required to use the database
from C-code.
To use the database from perl, you should also install the perl interface
(TDB_File, available from
CPAN).
So what can you do if you have it? Here's a taster:
my $tdb = TDB_File->open($filename, TDB_CLEAR_IF_FIRST) or die $!;
$tdb->store(key => 'value') or die $tdb->errorstr;
$tdb->traverse(sub { print "$_[0] -> $_[1]\n" });
See
http://cpan.uwinnipeg.ca/htdocs/TDB_File/TDB_File.html for the full doc.
Note: this package was formerly bundled as part of
WebDAVPlugin. If you install this package,
WebDAVPlugin will work with it quite happily (and vice-versa).
Installation
The following steps are automated by the install script shipped with this module.
If you are installing as an administrator, make sure you don't already have
tdb installed (it would be embarassing to overwrite an existing install used by Samba, for example!)
The distribution includes all you need to build and install it. Starting from your TWiki root directory:
cd lib/tdb
./configure
By default
make install
will now build the module and install the library in
/usr/lib
. If you can't write to
/usr/lib
, you can change the target directory like this:
./configure --prefix=/home/twiki/libs
but you will have to work out how to explain to Apache that it has to look there, if you are using the library with a CGI script.
Settings
-
- Set SHORTDESCRIPTION = TDB is the tiny database from the Samba project. This contrib bundles it to make it easily installable for use with other TWiki extensions.
Info
Acknowledgements
- Thanks to the Samba and TDB projects for their excellent database!