- PLATFORM-SPECIFIC INVOCATION
- PLATFORM SUPPORT
Linux::Perl - Linux system calls with pure Perl
my $efd = Linux::Perl::eventfd->new(); #...or, if you know your architecture: my $efd = Linux::Perl::eventfd::x86_64->new();
In memory-sensitive environments it is useful to minimize the number of XS modules that Perl loads. Oftentimes the CPAN modules that implement support for various Linux system calls, though, will bring in XS for the sake of writing platform-neutral code.
Linux::Perl accommodates use cases where platform neutrality is less of a concern than minimizing memory usage.
Each family of system calls lives in its own namespace under
The distribution contains a number of other modules, none of which is currently intended for outside use.
Each Linux::Perl system call implementation can be called with a platform-neutral syntax as well as with a platform-specific one; for example:
my $efd = Linux::Perl::eventfd->new(); my $efd = Linux::Perl::eventfd::x86_64->new();
The platform-specific call is a bit lighter because it avoids loading Config to determine the current platform.
arm are the best-supported platforms.
i386 also have some support.
Support for adding new platforms just involves adding new modules with the necessary constants to the distribution.
Note also that a 64-bit Perl is generally assumed.
Felipe Gasper (FELIPE)
Copyright 2018 by Gasper Software Consulting
This distribution is released under the same license as Perl.