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 Linux::Perl:
Linux::Perl
Linux::Perl::epoll
Linux::Perl::inotify
Linux::Perl::eventfd
Linux::Perl::getrandom
Linux::Perl::timerfd
Linux::Perl::memfd
Linux::Perl::signalfd
Linux::Perl::sigprocmask
Linux::Perl::aio
Linux::Perl::uname
Linux::Perl::getdents
Linux::Perl::mq
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.
x86_64 and arm are the best-supported platforms. Limited support is included for i686 and i386.
x86_64
arm
i686
i386
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.
https://github.com/FGasper/p5-Linux-Perl
Felipe Gasper (FELIPE)
Copyright 2018 by Gasper Software Consulting
This distribution is released under the same license as Perl.
To install Linux::Perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::Perl
CPAN shell
perl -MCPAN -e shell install Linux::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.