NAME

File::Lock::Multi::FlockFiles - flock() multiple files to emulate taking out multiple locks on a single file.

DESCRIPTION

This module uses perl's flock() call on multiple files to emulate taking out multiple locks on a single file. For instance, if you ask to lock the file "foo.txt" a maximum of 5 times, File::Lock::Multi::FlockFiles will pretend to do this by acquiring locks on the files "foo.txt.1", "foo.txt.2", "foo.txt.3", etc.

By default, these files will be deleted when the locks are released to keep it from making too much of a mess in your filesystem.

OPTIONS

In addition to the standard File::Lock::Multi options, the following additional options are available when calling new():

clean

Clean up (unlink) our lockfiles when we're done with them.

If false, don't clean.

If set to "1", clean up lockfiles that we created.

If set to a value greater than "1", clean up lockfiles whether or not we created them.

Default: 1

format

A sprintf() format string used to come up with the individual lockfile names. sprintf() will be passed the file's path and the lock number as the first and second parameters. (Default: "%s.%i").

LICENSE

Copyright 2009 Tyler "Crackerjack" MacDonald <japh@crackerjack.net>

This is free software; You may distribute it under the same terms as perl itself.

SEE ALSO

File::Lock::Multi, "flock" in perlfunc