File::NFSLockFile::NFSLock is a Perl module to do NFS (or not) locking. | |
Download |
File::NFSLock Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Paul T Seamons
- Publisher web site:
- http://search.cpan.org/~bbb/File-NFSLock-1.20/lib/File/NFSLock.pm
File::NFSLock Tags
File::NFSLock Description
File::NFSLock is a Perl module to do NFS (or not) locking. File::NFSLock is a Perl module to do NFS (or not) locking.SYNOPSIS use File::NFSLock qw(uncache); use Fcntl qw(LOCK_EX LOCK_NB); my $file = "somefile"; ### set up a lock - lasts until object looses scope if (my $lock = new File::NFSLock { file => $file, lock_type => LOCK_EX|LOCK_NB, blocking_timeout => 10, # 10 sec stale_lock_timeout => 30 * 60, # 30 min }) { ### OR ### my $lock = File::NFSLock->new($file,LOCK_EX|LOCK_NB,10,30*60); ### do write protected stuff on $file ### at this point $file is uncached from NFS (most recent) open(FILE, "+
File::NFSLock Related Software