Subject: | no way to create a tm::materialized::mldbm object |
Date: | Mon, 21 May 2007 12:53:08 +1000 |
To: | bug-TM [...] rt.cpan.org |
From: | Alexander Zangerl <az [...] bond.edu.au> |
tm: all versions including 1.26
when using TM::Synchronizable::MLDBM to create a db file
with url file:./x.db from a topicmap that was sourced in from
some other source, the sync_out method dies with this error:
---
file './x.db' is not accessible (or does not exist)
at /usr/share/perl5/TM/ResourceAble.pm line 147.
---
* obviously the file i want to create does not exist yet, and it
makes no sense for resourceable to attempt to access it.
* furthermore, the access in resourceable does not reflect the
files created: touching x.db gets one over the first hurdle, but
the result is the creation of x.db.dir and x.db.pag...
which of course are NOT checked on a subsequent run.
* the resourcable/mldbm combination must be consistent: if
one is supposed to produce .pag and .dir files, then the bloody
other must check for those files, not some third unrelated ones.
* next, the mldbm class uses MLDBM with the default db file type,
which as per docs is not a good idea:
--
Although SDBM_File is used by MLDBM by default, it is not a good
choice if you're storing large data structures. Berkeley DB and
GDBM both do not have these limits, so I recommend using either of
those instead.
--
instead of
use MLDBM qw(MLDBM::Sync::SDBM_File);
using
use MLDBM qw(DB_File);
would also get rid of the separate .dir/pag files and in one
fast swoop take care of the file name discrepancies.
regards
az
--
+ Alexander Zangerl az@bond.edu.au DSA 0xF860ACF1 +
+ Bond University IT School phone +61 7 5595 3398 +
Message body not shown because it is not plain text.