NAME

IO::File::fcntl - extension of IO::File for fcntl

SYNOPSIS

    use IO::File::fcntl;

    my $fh = new IO::File::fcntl($filename);     # auto lock_(ex|sh)
    my $fh = new IO::File::fcntl($filename,'<'); # auto lock_ex
    my $fh = new IO::File::fcntl($filename,'>','lock_sh');
    my $fh = new IO::File::fcntl($filename,'<','lock_ex',60);
    etc,etc....

DESCRIPTION

IO::File::fcntl inherits from IO::File::Lockable.

CONSTRUCTOR

new (FILENAME [,MODE [,LOCK_MODE [,TIMEOUT]]]);

creates a IO::File::fcntl.

METHODS

$fh->open(FILENAME [,MODE [,LOCK_METHOD [,TIMEOUT]]]);
$fh->fcntl(LOCK_MODE,[TIMEOUT]);
$fh->lock_ex([TIMEOUT]);
$fh->lock_sh([TIMEOUT]);
$fh->lock_un([TIMEOUT]);
$fh->fcntl_ex([TIMEOUT]);
$fh->fcntl_sh([TIMEOUT]);
$fh->fcntl_un([TIMEOUT]);

AUTHOR

Shin Honda (makoto[at]cpan.org,makoto[at]cpan.jp)

copyright

Copyright (c) 2004- Shin Honda. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Fcntl, IO::File, IO::File::Lockable IO::File::flock