1Mail::Box::Locker::FlocUks(e3r)Contributed Perl DocumentMaatiilo:n:Box::Locker::Flock(3)
2
3
4

NAME

6       Mail::Box::Locker::Flock - lock a folder using kernel file-locking
7

INHERITANCE

9        Mail::Box::Locker::Flock
10          is a Mail::Box::Locker
11          is a Mail::Reporter
12

SYNOPSIS

14        See Mail::Box::Locker
15

DESCRIPTION

17       The "::Flock" object lock the folder by creating an exclusive lock on
18       the file using the kernel's "flock" facilities.  This lock is created
19       on a separate file-handle to the folder file, so not the handle which
20       is reading.
21
22       File locking does not work in some situations, for instance for operat‐
23       ing systems do not support "flock".
24

METHODS

26       Constructors
27
28       Mail::Box::Locker::Flock->new(OPTIONS)
29
30        Option --Defined in     --Default
31        expires  Mail::Box::Locker  1 hour
32        file     Mail::Box::Locker  undef
33        folder   Mail::Box::Locker  <required>
34        log      Mail::Reporter   'WARNINGS'
35        method   Mail::Box::Locker  'FLOCK'
36        timeout  Mail::Box::Locker  10 seconds
37        trace    Mail::Reporter   'WARNINGS'
38
39           . expires SECONDS
40
41           . file FILENAME
42
43           . folder FOLDER
44
45           . log LEVEL
46
47           . method STRING⎪CLASS⎪ARRAY
48
49           . timeout SECONDS⎪'NOTIMEOUT'
50
51           . trace LEVEL
52
53       The Locker
54
55       $obj->filename([FILENAME])
56
57           See "The Locker" in Mail::Box::Locker
58
59       $obj->folder
60
61           See "The Locker" in Mail::Box::Locker
62
63       $obj->name
64
65           See "The Locker" in Mail::Box::Locker
66
67       Locking
68
69       $obj->hasLock
70
71           See "Locking" in Mail::Box::Locker
72
73       $obj->isLocked
74
75       $obj->lock
76
77       $obj->unlock
78
79           See "Locking" in Mail::Box::Locker
80
81       Error handling
82
83       $obj->AUTOLOAD
84
85           See "Error handling" in Mail::Reporter
86
87       $obj->addReport(OBJECT)
88
89           See "Error handling" in Mail::Reporter
90
91       $obj->defaultTrace([LEVEL]⎪[LOGLEVEL, TRACELEVEL]⎪[LEVEL, CALLBACK])
92
93       Mail::Box::Locker::Flock->defaultTrace([LEVEL]⎪[LOGLEVEL,
94       TRACELEVEL]⎪[LEVEL, CALLBACK])
95
96           See "Error handling" in Mail::Reporter
97
98       $obj->errors
99
100           See "Error handling" in Mail::Reporter
101
102       $obj->log([LEVEL [,STRINGS]])
103
104       Mail::Box::Locker::Flock->log([LEVEL [,STRINGS]])
105
106           See "Error handling" in Mail::Reporter
107
108       $obj->logPriority(LEVEL)
109
110       Mail::Box::Locker::Flock->logPriority(LEVEL)
111
112           See "Error handling" in Mail::Reporter
113
114       $obj->logSettings
115
116           See "Error handling" in Mail::Reporter
117
118       $obj->notImplemented
119
120           See "Error handling" in Mail::Reporter
121
122       $obj->report([LEVEL])
123
124           See "Error handling" in Mail::Reporter
125
126       $obj->reportAll([LEVEL])
127
128           See "Error handling" in Mail::Reporter
129
130       $obj->trace([LEVEL])
131
132           See "Error handling" in Mail::Reporter
133
134       $obj->warnings
135
136           See "Error handling" in Mail::Reporter
137
138       Cleanup
139
140       $obj->DESTROY
141
142           See "Cleanup" in Mail::Box::Locker
143
144       $obj->inGlobalDestruction
145
146           See "Cleanup" in Mail::Reporter
147

DIAGNOSTICS

149       Warning: Folder $folder already flocked
150
151       The folder is already locked, but you attempt to lock it again.  The
152       behavior of double flock's is platform dependend, and therefore should
153       not be attempted.  The second lock is ignored (but the unlock isn't)
154
155       Error: Package $package does not implement $method.
156
157       Fatal error: the specific package (or one of its superclasses) does not
158       implement this method where it should. This message means that some
159       other related classes do implement this method however the class at
160       hand does not.  Probably you should investigate this and probably
161       inform the author of the package.
162
163       Error: Unable to check lock file $filename for $folder: $!
164
165       To check whether the filename is used to flock a folder, the file must
166       be opened.  Apparently this fails, which does not mean that the folder
167       is locked neither that it is unlocked.
168
169       Error: Unable to open flock file $filename for $folder: $!
170
171       For flock-ing a folder it must be opened, which does not succeed for
172       the specified reason.
173
174       Error: Will never get a flock at $filename for $folder: $!
175
176       Tried to flock the folder, but it did not succeed.  The error code
177       received from the OS indicates that it will not succeed ever, so we do
178       not need to try again.
179

SEE ALSO

181       This module is part of Mail-Box distribution version 2.070, built on
182       March 25, 2007. Website: http://perl.overmeer.net/mailbox/
183

LICENSE

185       Copyrights 2001-2007 by Mark Overmeer.For other contributors see
186       ChangeLog.
187
188       This program is free software; you can redistribute it and/or modify it
189       under the same terms as Perl itself.  See
190       http://www.perl.com/perl/misc/Artistic.html
191
192
193
194perl v5.8.8                       2007-03-25       Mail::Box::Locker::Flock(3)
Impressum