24 May 2015 09:25:20 UTC
- Distribution: File-Lock-Multi
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (435 / 69 / 0)
- KwaliteeBus factor: 0
- % Coverage
- License: perl_5
- Activity24 month
- Download (11.16KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionCRAKRJACK Tyler MacDonald
File::Lock::Multi::FlockFiles - flock() multiple files to emulate taking out multiple locks on a single file.
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::FlockFileswill 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.
In addition to the standard File::Lock::Multi options, the following additional options are available when calling
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.
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").
Copyright 2009 Tyler "Crackerjack" MacDonald <email@example.com>
This is free software; You may distribute it under the same terms as perl itself.
Module Install Instructions
To install File::Lock::Multi, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install File::Lock::Multi
For more information on module installation, please visit the detailed CPAN module installation guide.