Mail::...otLock(3pm)
π Mail::Box::Locker::DotLock π
heyyy bestie, welcome to Mail::...otLock(3pm) β this one lives in the User Contributed Perl Documentation section and honestly? it's giving tiny-but-mighty. it does one (1) job and it does it cutely. let's get into it π
β¨ NAME β¨
Mail::Box::Locker::DotLock β lock a folder with a separate file. that's it. that's the whole brand. π¦
πΈ INHERITANCE πΈ
family tree check, because we love a lineage moment:
Mail::Box::Locker::DotLock- is a
Mail::Box::Locker - is a
Mail::Reporter
- is a
so it's inheriting the whole squad's energy. slay. π
β SYNOPSIS β
See Mail::Box::Locker
bestie the synopsis is literally a redirect. iconic behaviour, honestly. go read the parent page. π
π¦ DESCRIPTION π¦
okay so the ::DotLock object locks the folder by creating a file with the same name as the folder, extended by .lock.
that's the whole trick!! you want the folder? you gotta make the little .lock friend first. no lock file, no entry. it's giving velvet rope at the club. π
Extends "DESCRIPTION" in Mail::Box::Locker.
π METHODS π
Extends "METHODS" in Mail::Box::Locker.
π Constructors π
Extends "Constructors" in Mail::Box::Locker.
$class->new(%options)
Name of the file to lock. By default, the folder's name is extended with .lock. Improves base, see "METHODS" in Mail::Box::Locker.
here's the full menu of options, defaults included, no cap:
dotlock_fileβ defined in: (this class) β default:undefexpiresβ defined in:Mail::Box::Lockerβ default:1 hourfileβ defined in:Mail::Box::Lockerβ default:<folderfile>.lockfolderβ defined in:Mail::Box::Lockerβ default:<C<undef>>methodβ defined in:Mail::Box::Lockerβ default:'DOTLOCK'timeoutβ defined in:Mail::Box::Lockerβ default:10
and now the lil explanation for each:
dotlock_file => $fileβ Alternative name for"file", especially useful to confusion when the multi locker is used.expires => $secondsfile => $filefolder => $foldermethod => $name|CLASS|\@namestimeout => $seconds|'NOTIMEOUT'
π Attributes π
Extends "Attributes" in Mail::Box::Locker.
$obj->expires( [SECONDS] )β Inherited, see"Attributes"in Mail::Box::Locker$obj->filename( [$filename] )β Inherited, see"Attributes"in Mail::Box::Locker$obj->folder()β Inherited, see"Attributes"in Mail::Box::Locker$obj->name()β Inherited, see"Attributes"in Mail::Box::Locker$obj->timeout( [SECONDS] )β Inherited, see"Attributes"in Mail::Box::Locker
all of these are inherited, so no new lore here, but we're keeping them listed because rules are rules π
π Locking π
Extends "Locking" in Mail::Box::Locker.
$obj->hasLock()β Inherited, see"Locking"in Mail::Box::Locker$obj->isLocked()β Inherited, see"Locking"in Mail::Box::Locker$obj->lock()β Inherited, see"Locking"in Mail::Box::Locker$obj->unlock()β Inherited, see"Locking"in Mail::Box::Locker
the actual lock/unlock brainpower lives in the parent, so go read Mail::Box::Locker for the real tea. π«
π 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"in Mail::Box::Locker
π DIAGNOSTICS π
buckle up bestie, here's every single way this thing can yell at you:
- Error: Dotlock requires a lock file name. Cast by
folder() - Error: class $package does not implement method $method. Fatal error: the specific
$package(or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast bynotImplemented() - Warning: couldn't remove lockfile $file: $! Cast by
unlock() - Fault: failed to remove expired lockfile $file: $! Cast by
lock() - Warning: folder already locked with file $file Cast by
lock() - Fault: lockfile $file can never be created: $! Cast by
lock() - Warning: removed expired lockfile $file Cast by
lock()
π¨ the Fault lines are the serious ones β "failed to remove expired lockfile" and "lockfile can never be created" both mean something genuinely went wrong with your filesystem or perms, not just a lil oopsie. read them and actually do something about them, fr fr.
π 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.
and that's the whole page, bestie!! π₯³ obligatory sign-off: this doc shipped as perl v5.40.1, dated 2026-05-09, page Mail::...otLock(3pm). go lock a folder, you absolute legend πβ¨ππ¦
π¦ 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