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::POSIX - lock a folder using kernel file-locking

CLASS INHERITANCE

 Mail::Box::Locker::POSIX
   is a Mail::Box::Locker
   is a Mail::Reporter

SYNOPSIS

 See Mail::Box::Locker

DESCRIPTION

This locker object is created by the folder to get an exclusive lock on the file which contains the data using the kernel's POSIX facilities. This lock is created on a separate file-handle to the folder file, so not the handle which is reading. Not all platforms support POSIX locking.

METHODS

Initiation

new OPTIONS

(Class method)

 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()

name

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

Locking

filename [FILENAME]

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

folder

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

hasLock

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

isLocked
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.037.

Copyright (c) 2001-2003 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.