Main > Programming > Libraries >

File::NFSLock 1.20

File::NFSLock 1.20

Sponsored Links

File::NFSLock 1.20 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.018 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 914
Date added: 2007-04-27
Publisher: Paul T Seamons

File::NFSLock 1.20 description

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") || die $!;
### or open it any way you like
### my $fh = IO::File->open( $file, w ) || die $!
### update (uncache across NFS) other files
uncache("someotherfile1");
uncache("someotherfile2");
# open(FILE2,"someotherfile1");
### unlock it
$lock->unlock();
### OR
### undef $lock;
### OR let $lock go out of scope
}else{
die "I couldnt lock the file [$File::NFSLock::errstr]";
}
Program based of concept of hard linking of files being atomic across NFS. This concept was mentioned in Mail::Box::Locker (which was originally presented in Mail::Folder::Maildir). Some routine flow is taken from there -- particularly the idea of creating a random local file, hard linking a common file to the local file, and then checking the nlink status. Some ideologies were not complete (uncache mechanism, shared locking) and some coding was even incorrect (wrong stat index). File::NFSLock was written to be light, generic, and fast.
Enhancements:
- Perl

File::NFSLock 1.20 Screenshot

Advertisements

File::NFSLock 1.20 Keywords

Bookmark File::NFSLock 1.20

Hyperlink code:
Link for forum:

File::NFSLock 1.20 Copyright

WareSeeker periodically updates pricing and software information of File::NFSLock 1.20 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of File::NFSLock 1.20 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
File::lockf is a Perl module interface to the lockf system call. Free Download
File::BasicFlock is a Perl module for file locking with flock. Free Download
File::Repl is a Perl module that provides file replication utilities. Free Download
File::Flock is a Perl module for file locking with flock. Free Download
Egg::Release is a Perl module for WEB application framework release version. Free Download
Prima::Lists is a Perl module for user-selectable item list widgets. Free Download
movieinfo is a Perl module created to dump information about movie file(s). Free Download
Prima::image-load is a Perl module using image subsystem. Free Download