gpldoc

Sympa documentation licensed under GPL

NAME

Sympa::LockedFile - Filehandle with locking

SYNOPSIS

 use Sympa::LockedFile;
 
 # Create filehandle acquiring lock.
 my $fh = Sympa::LockedFile->new('/path/to/file', 20, '+<') or die;
 # or,
 my $fh = Sympa::LockedFile->new();
 $fh->open('/path/to/file', 20, '+<') or die;
 
 # Operations...
 while (<$fh>) { ... }
 seek $fh, 0, 0;
 truncate $fh, 0;
 print $fh "blah blah\n";
 # et cetera.

 # Close filehandle releasing lock.
 $fh->close;

DESCRIPTION

This class implements a filehandle with locking.

Class Methods

Instance Methods

Instances of Sympa::LockedFile support the methods provided by IO::File.

Following methods are specific to this module.

SEE ALSO

“Functions for filehandles, files or directories” in perlfunc, “I/O Operators” in perlop, IO::File, File::NFSLock.

HISTORY

Lock module written by Olivier Salaün appeared on Sympa 5.3.

Support for NFS was added by Kazuo Moriwaka.

Rewritten Sympa::LockedFile module was initially written by IKEDA Soji for Sympa 6.2.


The content of this page is automatically generated from the source distribution of Sympa. For details about this document see original source file.

Theme originally designed by orderedlist