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 locks 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
23       operating systems do not support "flock".
24
25       Extends "DESCRIPTION" in Mail::Box::Locker.
26

METHODS

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

DIAGNOSTICS

134       Warning: Folder $folder already flocked
135           The folder is already locked, but you attempt to lock it again.
136           The behavior of double flock's is platform dependent, and therefore
137           should not be attempted.  The second lock is ignored (but the
138           unlock isn't)
139
140       Error: Package $package does not implement $method.
141           Fatal error: the specific package (or one of its superclasses) does
142           not implement this method where it should. This message means that
143           some other related classes do implement this method however the
144           class at hand does not.  Probably you should investigate this and
145           probably inform the author of the package.
146
147       Error: Unable to check lock file $filename for $folder: $!
148           To check whether the filename is used to flock a folder, the file
149           must be opened.  Apparently this fails, which does not mean that
150           the folder is locked neither that it is unlocked.
151
152       Error: Unable to open flock file $filename for $folder: $!
153           For flock-ing a folder it must be opened, which does not succeed
154           for the specified reason.
155
156       Error: Will never get a flock at $filename for $folder: $!
157           Tried to flock the folder, but it did not succeed.  The error code
158           received from the OS indicates that it will not succeed ever, so we
159           do not need to try again.
160

SEE ALSO

162       This module is part of Mail-Box distribution version 3.008, built on
163       October 04, 2019. Website: http://perl.overmeer.net/CPAN/
164

LICENSE

166       Copyrights 2001-2019 by [Mark Overmeer]. For other contributors see
167       ChangeLog.
168
169       This program is free software; you can redistribute it and/or modify it
170       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
171
172
173
174perl v5.30.1                      2020-01-30       Mail::Box::Locker::Flock(3)
Impressum