Fcntl - load the C Fcntl.h defines
use Fcntl; use Fcntl qw(:DEFAULT :flock);
This module is just a translation of the C fnctl.h file. Unlike the old mechanism of requiring a translated fnctl.ph file, this uses the h2xs program (see the Perl source distribution) and your native C compiler. This means that it has a far more likely chance of getting the numbers right.
#define symbols get translated; you must still correctly pack up your own arguments
to pass as args for locking functions, etc.
By default your system's F_* and O_* constants (eg, F_DUPFD and O_CREAT) and the FD_CLOEXEC constant are exported into your namespace.
You can request that the
LOCK_UN) be provided by using the tag
:flock. See the Exporter manpage.
You can request that the old constants
FTRUNC) be provided for compatibility reasons by using the tag
:Fcompat. For new applications the newer versions of these constants are suggested
Please refer to your native
open() documentation to see what constants are implemented in your system.
If rather than formatting bugs, you encounter substantive content errors in these documents, such as mistakes in the explanations or code, please use the perlbug utility included with the Perl distribution.