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 πŸ™)

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, dated 2026-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