use Fcntl; use Fcntl qw(:DEFAULT :flock);
#define
symbols get translated; you must still correctly pack up your own arguments
to pass as args for locking functions, etc.
You can request that the flock()
constants
(LOCK_SH,
LOCK_EX,
LOCK_NB and
LOCK_UN) be provided by using the tag
:flock. See the Exporter manpage.
You can request that the old constants
(FAPPEND,
FASYNC,
FCREAT,
FDEFER,
FEXCL,
FNDELAY,
FNONBLOCK,
FSYNC,
FTRUNC) be provided for compatibility reasons by using the tag
:Fcompat
. For new applications the newer versions of these constants are suggested
(O_APPEND,
O_ASYNC,
O_CREAT,
O_DEFER,
O_EXCL,
O_NDELAY,
O_NONBLOCK,
O_SYNC,
O_TRUNC).
Please refer to your native fcntl()
and open()
documentation to see what constants are implemented in your system.