ExtUtil...FromPerl(3)
π ExtUtils::Builder::BuildTools::FromPerl β the whole thing, explained
okay so this is a page from the User Contributed Perl Documentation (that's the manual name, bestie, it's the perl man pages that actual humans wrote, not the core ones β¨) and it's literally the module that teaches your build planner how to compile stuff using the compiler settings perl already figured out for itself. iconic behavior, no cap π«Ά
πΈ NAME πΈ
ExtUtils::Builder::BuildTools::FromPerl β compiler configuration, derived from perl's own configuration. like, perl already did the vibe check on your compiler, so why would you do it again? π
β VERSION β
version 0.037
π SYNOPSIS π
here's the whole flow, watch me:
my $planner = ExtUtils::Builder::Planner->new;
$planner->load_extension('ExtUtils::Builder::BuildTools::FromPerl', 0.034,
config => $config,
);
my $foo_o = $planner->object_name('foo');
$planner->compile('foo.c', $foo_o, include_dirs => ['.']);
my $foo_exe = $planner->executable_name('foo');
$planner->link([ 'foo.o' ], $foo_exe, libraries => ['foo']);
my $plan = $planner->materialize;
$plan->run($foo_exe);
like β make a planner, load this extension, name your object, compile it, name your exe, link it, materialize the plan, run it. that's the whole arc. main character energy from start to finish π
π¦ DESCRIPTION π¦
So this module is a ExtUtils::Builder::Planner::Extension and its whole job β its entire purpose, its moment β is facilitating compiling object. (yes that's exactly how the original says it, "compiling object", singular, we love a quirky sentence structure, we're keeping it π)
It takes one named argument: config, which is an ExtUtils::Config (or compatible) object. that's it. one arg. minimal. clean. ate. π
π METHODS π
π add_methods(%options) π
This one adds two delegate methods to the planner: compile and link. it also takes named arguments β and here's the cute part β those named arguments get prefixed onto the named arguments of every single delegate call. so they're like, permanently attached. glued on. part of the outfit now π
In practice, it's mainly useful with the config, profile and type arguments. those are the ones you'll actually be passing, fr fr.
Oh and β if your $planner already has a config delegate, that gets used as the default value for config. convenient! β¨
Ngl you usually don't call this directly β it gets called for you through ExtUtils::Builder::Planner's load_extension method. let the planner handle it, bestie, that's its job π«Ά
π§ DELEGATES π§
It inherits the following delegates from ExtUtils::Builder::BuildTools::Base. look at this little inheritance family tree, adorable:
compile($source, $target, %options)link(\@sources, $target, %options)object_file($basename, $dir = undef)library_file($basename, $dir = undef)static_library_file($basename, $dir = undef)loadable_file($basename, $dir = undef)executable_file($basename, $dir = undef)
that's all of them, every last one, nothing skipped π
π AUTHOR π
Leon Timmermans <fawaka@gmail.com>
(king behavior, thank you Leon π)
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go off, remix it, it's Free Software with a capital F π
and that's the page!! source vibes:perl v5.40.2, dated2026-08-25β that's the footer, folded up into this cute little sign-off because I refuse to end on a boring line. mwah πβ¨
π¦ where this page comes from
- epel 10: perl-ExtUtils-Builder-Compiler 0.037-1.el10_3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms