1Mail::Box::Locker::MultUis(e3r)Contributed Perl DocumentMaatiilo:n:Box::Locker::Multi(3)
2
3
4
6 Mail::Box::Locker::Multi - lock a folder in all ways which work
7
9 Mail::Box::Locker::Multi
10 is a Mail::Box::Locker
11 is a Mail::Reporter
12
14 See Mail::Box::Locker
15
17 The "::Multi" locker locks a folder in each way it can. This way, the
18 chance is highest that any other program will leave the folder alone
19 during our access to it.
20
21 NFS-lock and Flock are tried. More may be added when the ways to lock
22 are extended. DotLock overlaps with NFS-lock, but NFS-lock is safer,
23 so that version is preferred.
24
26 Constructors
27 Mail::Box::Locker::Multi->new(OPTIONS)
28 You may also pass all OPTIONS understood by the initiated lockers
29 used by the multi locker.
30
31 -Option --Defined in --Default
32 expires Mail::Box::Locker 1 hour
33 file Mail::Box::Locker undef
34 folder Mail::Box::Locker <undef>
35 log Mail::Reporter 'WARNINGS'
36 method Mail::Box::Locker 'MULTI'
37 timeout Mail::Box::Locker 10 seconds
38 trace Mail::Reporter 'WARNINGS'
39 use <all possible>
40
41 expires => SECONDS
42 file => FILENAME
43 folder => FOLDER
44 log => LEVEL
45 method => STRING|CLASS|ARRAY
46 timeout => SECONDS|'NOTIMEOUT'
47 trace => LEVEL
48 use => ARRAY-of-(NAMES|LOCKER)
49 Array of locker type NAMES or LOCKER objects to be used to lock
50 one folder. The type NAMES are converted into objects. When you
51 create your own LOCKER objects, be sure to set the timeout very
52 short (preferrably to 1).
53
54 Some locking types are not available on some platforms, so they
55 will not be excluded from the default list (NFS POSIX Flock).
56
57 example: using a subset of multi-lockers
58
59 my $locker = Mail::Box::Locker::Multi->new(use => ['DOTLOCK','FLOCK']);
60
61 The Locker
62 $obj->filename([FILENAME])
63 See "The Locker" in Mail::Box::Locker
64
65 $obj->folder([FOLDER])
66 See "The Locker" in Mail::Box::Locker
67
68 $obj->lockers
69 Returns a list with all locker objects used by this object.
70
71 $obj->name
72 See "The Locker" in Mail::Box::Locker
73
74 Locking
75 $obj->hasLock
76 See "Locking" in Mail::Box::Locker
77
78 $obj->isLocked
79 See "Locking" in Mail::Box::Locker
80
81 $obj->lock(FOLDER)
82 See "Locking" in Mail::Box::Locker
83
84 $obj->unlock
85 See "Locking" in Mail::Box::Locker
86
87 Error handling
88 $obj->AUTOLOAD
89 See "Error handling" in Mail::Reporter
90
91 $obj->addReport(OBJECT)
92 See "Error handling" in Mail::Reporter
93
94 $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
95 Mail::Box::Locker::Multi->defaultTrace([LEVEL]|[LOGLEVEL,
96 TRACELEVEL]|[LEVEL, CALLBACK])
97
98 See "Error handling" in Mail::Reporter
99
100 $obj->errors
101 See "Error handling" in Mail::Reporter
102
103 $obj->log([LEVEL [,STRINGS]])
104 Mail::Box::Locker::Multi->log([LEVEL [,STRINGS]])
105
106 See "Error handling" in Mail::Reporter
107
108 $obj->logPriority(LEVEL)
109 Mail::Box::Locker::Multi->logPriority(LEVEL)
110
111 See "Error handling" in Mail::Reporter
112
113 $obj->logSettings
114 See "Error handling" in Mail::Reporter
115
116 $obj->notImplemented
117 See "Error handling" in Mail::Reporter
118
119 $obj->report([LEVEL])
120 See "Error handling" in Mail::Reporter
121
122 $obj->reportAll([LEVEL])
123 See "Error handling" in Mail::Reporter
124
125 $obj->trace([LEVEL])
126 See "Error handling" in Mail::Reporter
127
128 $obj->warnings
129 See "Error handling" in Mail::Reporter
130
131 Cleanup
132 $obj->DESTROY
133 See "Cleanup" in Mail::Box::Locker
134
135 $obj->inGlobalDestruction
136 See "Cleanup" in Mail::Reporter
137
139 Error: Package $package does not implement $method.
140 Fatal error: the specific package (or one of its superclasses) does
141 not implement this method where it should. This message means that
142 some other related classes do implement this method however the
143 class at hand does not. Probably you should investigate this and
144 probably inform the author of the package.
145
147 This module is part of Mail-Box distribution version 2.097, built on
148 January 26, 2011. Website: http://perl.overmeer.net/mailbox/
149
151 Copyrights 2001-2011 by Mark Overmeer. For other contributors see
152 ChangeLog.
153
154 This program is free software; you can redistribute it and/or modify it
155 under the same terms as Perl itself. See
156 http://www.perl.com/perl/misc/Artistic.html
157
158
159
160perl v5.12.3 2011-01-26 Mail::Box::Locker::Multi(3)