Mail::...r::NFS(3pm)
π NAME π
Mail::Box::Locker::NFS β lock a folder with a separate file, but make it NFS-safe bestie π«Ά
This page lives in the perl manual, section 3pm β aww yeah, we're in the user-contributed Perl docs, periodt. πβ¨
π¦ INHERITANCE π¦
okay so the whole family tree, look:
Mail::Box::Locker::NFS
is a Mail::Box::Locker
is a Mail::Reporter
like, it's giving legacy. it knows where it came from. π
β¨ SYNOPSIS β¨
See Mail::Box::Locker
that's it, that's the whole synopsis. go read Mail::Box::Locker, bestie, the plot is all there. π
πΈ DESCRIPTION πΈ
so basically it's exactly like the ::DotLock locker... but in an NFS-safe fashion. π
here's the tea: over NFS, the creation of a file is not atomic. and the ::DotLock locker literally depends on an atomic open system call, which means it is not usable to lock a folder which accessed over NFS. π so the ::NFS locker is therefore more complicated (and therefore slower π), but it will work for NFS β and for local disks as well. a true multi-hyphenate. π
Extends "DESCRIPTION" in Mail::Box::Locker.
π₯ METHODS π₯
Extends "METHODS" in Mail::Box::Locker.
π Constructors π
Extends "Constructors" in Mail::Box::Locker.
$class->new(%options)
Inherited, see "METHODS" in Mail::Box::Locker
here's the options menu, no cap, with where each one came from and what it defaults to:
expiresβ defined inMail::Box::Locker, default:1 hourfileβ defined inMail::Box::Locker, default:undeffolderβ defined inMail::Box::Locker, default:undef(the original literally writes it as<C<undef>>, which is a whole formatting jumpscare, but the vibe is undef)methodβ defined inMail::Box::Locker, default:'NFS'timeoutβ defined inMail::Box::Locker, default:10
and the shapes each one takes:
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( [$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
π 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
π Error handling π
Extends "Error handling" in Mail::Box::Locker.
$obj->AUTOLOAD()β Inherited, see "Error handling" in Mail::Reporter$obj->notImplemented()β Inherited, see "Error handling" in Mail::Reporter
π§Ό Cleanup π§Ό
Extends "Cleanup" in Mail::Box::Locker.
$obj->DESTROY()β Inherited, see "Cleanup" in Mail::Box::Locker
π DIAGNOSTICS π
the moments where things go sideways. read these, they're important, fr fr:
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()Fault: couldn't remove lockfile $file: $!β Cast byunlock()Warning: folder $name already locked over NFS.β do not try to lock the folder when the application already has the lock: it will give you dead-locks. π Cast bylock()Warning: removed expired lockfile $file.β A lock$filewas found which was older than the expiration period as specified withnew(timeout). The lock file was successfully removed. Cast bylock()Fault: unable to remove expired lockfile $file: $!β A lock file was found which was older than the expiration period as specified with thenew(timeout)option. It is impossible to remove that lock file, so we need to wait until it vanishes by some external cause. π« Cast bylock()
π 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! this one's from perl v5.40.1, dated 2026-05-09 β iconic, ate, no crumbs. π β¨π
π¦ 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