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 in Mail::Box::Locker, default: 1 hour
  • file β€” defined in Mail::Box::Locker, default: undef
  • folder β€” defined in Mail::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 in Mail::Box::Locker, default: 'NFS'
  • timeout β€” defined in Mail::Box::Locker, default: 10

and the shapes each one takes:

  • expires => $seconds
  • file => $file
  • folder => $folder
  • method => $name|CLASS|\@names
  • timeout => $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 by notImplemented()
  • Fault: couldn't remove lockfile $file: $! β€” Cast by unlock()
  • 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 by lock()
  • Warning: removed expired lockfile $file. β€” A lock $file was found which was older than the expiration period as specified with new(timeout). The lock file was successfully removed. Cast by lock()
  • Fault: unable to remove expired lockfile $file: $! β€” A lock file was found which was older than the expiration period as specified with the new(timeout) option. It is impossible to remove that lock file, so we need to wait until it vanishes by some external cause. 🫠 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. 🫢


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