On Tue, Jan 06, 2004 at 01:00:36PM -0600, david nicol wrote: > that works too. The first time I worked with dbm files, it was > with an implementation that produced both a .pag and a .dir file > for a database, so there was no one data file to lock. If I just use > C<opendbm> and let Perl select an implementation, I don't know what > the file name is going to be. It could be foo, it could be foo.db, it > could be both foo.dir and foo.pag. So if I use foo.advisory_lock for > the advisotyr lock, I'm safe regardless of implementation. I'm also > safe from the implementation needing the flock bits if it uses them. > I don't know that they do, but I also don't know that they don't. > > Also what would happen if you got your lockfile open syntax wrong > and accidentally clobbered your data? > > So I consider using a separate advisory file a best practice. I > have never done a performance comparison, but owuld be curious to see > one.
A splendid explanation. Thanks for that. Consider me convinced :-) Mx.