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::eventfd
Linux::Perl::aio
Linux::Perl::uname
Linux::Perl::getdents
Linux::Perl::getrandom
Linux::Perl::timerfd
Linux::Perl::epoll
The distribution contains a number of other modules, none of which is 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:
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.
The following platforms are supported:
x86_64 (i.e., 64-bit Intel/AMD)
arm (e.g., Raspberry Pi)
Note that a 64-bit Perl is assumed/required.
Support for adding new platforms just involves adding new modules with the necessary constants to the distribution.
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.