Alien::FFI(3)
π Alien::FFI β bestie, it's giving "build libffi and hand it over" π
This is a page from the User Contributed Perl Documentation π the manual name is Alien::FFI and section 3, if you were wondering. We're in the perl manpages, babes. Let's go π¦
β¨ NAME β¨
Alien::FFI β it builds libffi and makes it available. That's the whole job. Iconic behavior honestly. π
πΈ VERSION πΈ
version 0.27 β¨
π SYNOPSIS π
okay so first, in your Makefile.PL, you're gonna do this:
use ExtUtils::MakeMaker;
use Alien::Base::Wrapper ();
WriteMakefile(
Alien::Base::Wrapper->new('Alien::FFI')->mm_args2(
# MakeMaker args
NAME => 'My::XS',
...
),
);
and then, in your Build.PL, the vibe shifts slightly and you do this instead:
use Module::Build;
use Alien::Base::Wrapper qw( Alien::FFI !export );
my $builder = Module::Build->new(
...
configure_requires => {
'Alien::FFI' => '0',
...
},
Alien::Base::Wrapper->mb_args,
...
);
$build->create_build_script;
no cap, that's it. copy-paste era π
π¦ DESCRIPTION π¦
so like. This distribution installs libffi so that other Perl distributions can use it. It's the friend who brings the snacks to the group hang. π
and here's the part where it's lowkey smart: if libffi is already installed for your operating system, and it can actually be found, then this distribution will just use the libffi that comes with your OS. periodt. no extra work.
but if it's not there? π then it goes and downloads it from the Internet, builds it, and installs it for you. main character energy: it handles its own business so you don't have to. π₯
π SEE ALSO π
FFI::Platypusβ write Perl bindings to non-Perl libraries, and you get to skip C and skip XS. literally the dream. β¨FFI::CheckLibβ checks that a library is actually available for FFI. the vibe check, but for libraries. π
π AUTHOR π
Author: Graham Ollis <plicease@cpan.org> π«Ά
Contributors:
- Petr PΓsaΕ (
ppisar) πΈ
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2014-2022 by Graham Ollis. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, legally speaking. π
and that's the whole page bestie!! π¦ this cutie was rendered by perl v5.42.0 back on 2025-09-08, and yeah the footer says Alien::FFI(3) again because manpages love a little encore. mwah π bye!! π
π¦ where this page comes from
- fedora 43: perl-Alien-FFI 0.27-14.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms