The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mail::Box::Locker::NFS - lock a folder with a separate file, NFS-safe

CLASS INHERITANCE

Mail::Box::Locker::NFS is a Mail::Box::Locker is a Mail::Reporter

SYNOPSIS

 See Mail::Box::Locker

DESCRIPTION

Like the ::DotLock locker, but then in an NFS-safe fashion. Over NFS, the creation of a file is not atomic. The ::DotLock locker depends on an atomic open() hence in not usable. The ::NFS locker is more complicated (so slower), but will work for NFS -and for local disks too.

METHODS

Initiation

new OPTIONS
 OPTION               DEFAULT
 expires              1 hour
 file                 undef
 folder               <obligatory>
 log                  'WARNINGS'
 method               'DOTLOCK'
 timeout              10 seconds
 trace                'WARNINGS'
expires => SECONDS

See Mail::Box::Locker::new(expires)

file => FILENAME

See Mail::Box::Locker::new(file)

folder => FOLDER

See Mail::Box::Locker::new(folder)

log => LEVEL

See Mail::Reporter::new(log)

method => METHOD | CLASS

See Mail::Box::Locker::new(method)

timeout => SECONDS|'NOTIMEOUT'

See Mail::Box::Locker::new(timeout)

trace => LEVEL

See Mail::Reporter::new(trace)

The Locker

DESTROY

See Mail::Box::Locker::DESTROY()

filename

See Mail::Box::Locker::filename()

name

See Mail::Box::Locker::name()

Locking

hasLock

See Mail::Box::Locker::hasLock()

isLocked

See Mail::Box::Locker::isLocked()

lock FOLDER

See Mail::Box::Locker::lock()

unlock

See Mail::Box::Locker::unlock()

Logging and Tracing

defaultTrace [LEVEL, [LEVEL]

See Mail::Reporter::defaultTrace()

errors

See Mail::Reporter::errors()

log [LEVEL [,STRINGS]]

See Mail::Reporter::log()

report [LEVEL]

See Mail::Reporter::report()

reportAll [LEVEL]

See Mail::Reporter::reportAll()

trace [LEVEL]

See Mail::Reporter::trace()

warnings

See Mail::Reporter::warnings()

Other Methods

AUTOLOAD

See Mail::Reporter::AUTOLOAD()

inGlobalDestruction

See Mail::Reporter::inGlobalDestruction()

logPriority LEVEL

See Mail::Reporter::logPriority()

logSettings

See Mail::Reporter::logSettings()

notImplemented

See Mail::Reporter::notImplemented()

SEE ALSO

A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.

AUTHOR

Written by Mark Overmeer (mark@overmeer.net) with the help of many. See the ChangeLog for details.

VERSION

This code is beta, version 2.028.

Copyright (c) 2001-2002 by the authors. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.