Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 12235
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: rt.cpan.org [...] plan9.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.060
Fixed in: (no value)



Subject: POSIX lock method does not work
When trying to use the POSIX lock method like this: my $src = new Mail::Box::Mbox folder => "sent", lock_type => "POSIX"; one gets the error: ERROR: Unable to open POSIX lock file sent.lock for sent: No such file or directory strace shows that indeed Mail::Box::Mbox tries to lock "sent.lock", which is the wrong file. The deeper reason is that File::Box::File tags lock_extension to the foldername to arrive at the filename, which is both wrong as fcntl locking locks the folder itself, not a lockfile, and is a bug because the documentation claims that "lock_extension" is used for dotlocking only, when, in fact, it seems to be used for all lock types (so other types than POSIX might be broken, too). There is another minor bug in the Mail::Box::File documentation, which claims that the "lock_file" has a default of "<foldername>.<lock-extension>", with a spurious extra "." that is not added by the code itself (the code just adds <lock_extension> without the dot).
Show quoted text
> The deeper reason is that File::Box::File tags lock_extension to the > foldername to arrive at the filename,
That's bullshit, sorry for this bogus comment, lock_extension does not seem to matter in this case (however, it seems to get used _somehow_ regardles sof the locking method in use).