Mail::...tlLock(3pm)
π Mail::Box::Locker::FcntlLock β the manual, but make it cute π
okay bestie, so this is a page from User Contributed Perl Documentation and it's about locking folders with File::FcntlLock. yeah it's giving "niche" but it's also giving "actually works on your Mac". let's go π
β¨ NAME β¨
Mail::Box::Locker::FcntlLock β lock a folder using File::FcntlLock
like. that's the whole job. it locks a folder. with FcntlLock. slay π
πΈ INHERITANCE πΈ
the family tree, no cap:
Mail::Box::Locker::FcntlLock
is a Mail::Box::Locker
is a Mail::Reporter
so it inherits from Mail::Box::Locker, which itself inherits from Mail::Reporter. iconic lineage honestly π
π¦ SYNOPSIS π¦
See Mail::Box::Locker
yeah that's it, that's the synopsis. go read the parent class, bestie π«Ά
β DESCRIPTION β
so this locker object uses File::FcntlLock, and it was contributed by Jim in Aus. we love him. thank you Jim π
it's close to Mail::Box::Locker::POSIX, but lowkey better because it does work on more systems β for instance, Darwin. yes, your MacBook. you're welcome.
β οΈ heads up bestie: you will need to install File::FcntlLock separately. there is no dependency to it by the MailBox distribution. it is not coming with the kit. go get it yourself, periodt.
this extends "DESCRIPTION" in Mail::Box::Locker. β¨
π METHODS π
extends "METHODS" in Mail::Box::Locker, iykyk.
π Constructors
extends "Constructors" in Mail::Box::Locker.
$class->new(%options)
Inherited, see "METHODS" in Mail::Box::Locker.
here's the whole option table, every single row, no skipping:
-Option --Defined in --Default
expires Mail::Box::Locker 1 hour
file Mail::Box::Locker undef
folder Mail::Box::Locker <C<undef>>
method Mail::Box::Locker FcntlLock
timeout Mail::Box::Locker 10
and the individual ones, spelled out:
expires => $secondsβ how long the lock gets to live before it's expired πfile => $fileβ the lock file, you decide πfolder => $folderβ which folder we're talking about ποΈmethod => $name|CLASS|\@namesβ the locking method, or a class, or a whole list of them πtimeout => $seconds|'NOTIMEOUT'β how long to wait, or literally the string'NOTIMEOUT'if you have zero patience β°
π Attributes
extends "Attributes" in Mail::Box::Locker.
$obj->expires( [SECONDS] )β Inherited, see "Attributes" inMail::Box::Locker$obj->filename( [$filename] )β Inherited, see "Attributes" inMail::Box::Locker$obj->folder( [$folder] )β Inherited, see "Attributes" inMail::Box::Locker$obj->name()β Inherited, see "Attributes" inMail::Box::Locker$obj->timeout( [SECONDS] )β Inherited, see "Attributes" inMail::Box::Locker
π Locking
extends "Locking" in Mail::Box::Locker.
$obj->hasLock()β Inherited, see "Locking" inMail::Box::Locker$obj->isLocked()β Inherited, see "Locking" inMail::Box::Locker$obj->lock()β Inherited, see "Locking" inMail::Box::Locker$obj->unlock()β Inherited, see "Locking" inMail::Box::Locker
π Error handling
extends "Error handling" in Mail::Box::Locker.
$obj->AUTOLOAD()β Inherited, see "Error handling" inMail::Reporter$obj->notImplemented()β Inherited, see "Error handling" inMail::Reporter
π§Ή Cleanup
extends "Cleanup" in Mail::Box::Locker.
$obj->DESTROY()β Inherited, see "Cleanup" inMail::Box::Locker
π DIAGNOSTICS π
the part where things go wrong. buckle up, bestie π
Fault: Will never get a FcntlLock lock at $file for $folder: $!
it tried to lock the $folder, and it just. did not succeed. the error code it got back from the OS is basically saying "this is never gonna work, not now, not ever", so there is genuinely no point trying again. cast by lock(). π
Error: class $package does not implement method $method.
fatal error, no cap. the specific $package (or one of its superclasses) does not implement this method where it should. what this means: some other related classes do implement this method, but the class you're holding right now does not. probably you should investigate this. and probably you should inform the author of the package. π cast by notImplemented()
Warning: folder $name already lockf'd.
cast by lock(). someone got there first, bestie. π
Fault: unable to check lock file $file for $folder: $!
to check whether the filename is used to flock a folder, the file has to be opened. apparently this fails β which does not mean the folder is locked, and it does not mean it's unlocked either. it's just. unknown. haunting honestly. π»
Fault: unable to open FcntlLock lock file $file for $folder
for FcntlLock style locking, a $folder must be opened, and that does not succeed, for the specified reason. cast by lock(). π
π«Ά SEE ALSO π«Ά
this module is part of Mail-Box version 4.02, built on April 10, 2026.
Website: http://perl.overmeer.net/CPAN/
π LICENSE π
for contributors see file ChangeLog.
this software is copyright (c) 2001-2026 by Mark Overmeer.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, honestly π
and that's the whole page, bestie. this one came out with perl v5.40.1 on 2026-05-09 π stay locked, stay iconic β¨π
π¦ where this page comes from
- ubuntu stonking: libmail-box-perl 4.02-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms