Why not adopt me?
This distribution is up for adoption!
If you're interested then please contact the PAUSE module admins via
email.
NAME
File::Flock - file locking with flock
SYNOPSIS
use File::Flock;
lock($filename);
lock($filename, 'shared');
lock($filename, undef, 'nonblocking');
lock($filename, 'shared', 'nonblocking');
unlock($filename);
my $lock = new File::Flock '/somefile';
DESCRIPTION
Lock files using the flock() call. If the file to be locked does not exist, then the file is created. If the file was created then it will be removed when it is unlocked assuming it's still an empty file.
Locks can be created by new'ing a File::Flock object. Such locks are automatically removed when the object goes out of scope. The unlock() method may also be used.
AUTHOR
David Muir Sharnoff, <muir@idiom.com>