Alien::m4(3)
π Alien::m4 π
okay bestie, so this little gem is straight out of the User Contributed Perl Documentation collection, and it's literally the manual page for Alien::m4. Yes, THE Alien::m4. We're gonna go through it together, no cap. π¦
β¨ NAME β¨
Alien::m4 β find or build GNU m4 π
π VERSION π
version 0.21 β that's the one, periodt.
πΈ SYNOPSIS πΈ
Two ways to pull up, depending on your vibe.
π«Ά From a Perl script
use Alien::m4;
use Env qw( @PATH );
unshift @PATH, Alien::m4->bin_dir; # m4 is now in your path
π«Ά From Alien::Base Build.PL
use Alien:Base::ModuleBuild;
my $builder = Module::Build->new(
...
alien_bin_requires => {
'Alien::m4' => '0.07',
},
...
);
$builder->create_build_script;
π DESCRIPTION π
This package is here for all the other CPAN modules out there that need GNU m4 in their life. It's giving β¨supportive bestieβ¨ energy. It just finds it for you, or builds it, no drama.
π METHODS π
exe
my $m4 = Alien::m4->exe;
Returns the "name" of m4. Like, normally that name is "m4", but on some platforms it might be gm4 or gnum4, or honestly whatever tf $ENV{M4} says it is. She's flexible like that. πβοΈ
π§ HELPERS π§
m4
%{m4}
Returns the name of the m4 command. Usually just "m4". Short, sweet, iconic. β
π CAVEATS π
okay so, why GNU m4 specifically?? Valid question, bestie.
Lots of Unixen come with BSD or other variants of m4, and ngl those are perfectly good. Like, genuinely fine.
BUT π the main use case for this module is Alien::Autotools and friends, and Autoconf requires the GNU m4. Probably for political reasons, possibly for technical reasons β we don't make the rules, we just report them. π
So if you're on one of these Unixen, don't despair!! π«Ά You can usually install the GNU version of m4 either by building from source or by installing a binary package, and it might go by the name "gm4" or "gnum4". This module will find it, and Alien::Autotools will be able to use it. Slay. π₯
π AUTHOR π
Graham Ollis <plicease@cpan.org> β the main character who made this happen. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017 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.
fr fr, that's the whole page. go forth and find your m4. π
and that's a wrap!! this one shipped with perl v5.42.0 on 2026-02-19 β mwah, catch you on the next manpage bestie πβ¨π¦
π¦ where this page comes from
- fedora 43: perl-Alien-m4 0.21-10.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later
- fedora 44: perl-Alien-m4 0.21-11.fc44 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms