ExtUtil...ls::Base(3)

πŸ’… ExtUtils::Builder::BuildTools::Base(3) β€” the perl one, user contributed, you're welcome

okay so bestie, welcome to ExtUtils::Builder::BuildTools::Base, a whole base class for BuildTools implementations. It's giving "mom friend of the compiler world" β€” it doesn't do the work itself, it just hands out the delegates that do. 🫢


✨ VERSION ✨

version 0.037 β€” yes, that's the number, memorize it for the vibe check. πŸŽ€


🌸 DESCRIPTION 🌸

So this is a base-class for providers of compiler configuration. That's the whole personality. It defines the following delegates, and honestly? They ate. πŸ‘‘

🌈 compile($source, $target, %options)

This compiles $source to $target. Simple as that. It takes these optional arguments, and no, you can't skip reading them:

  • type β€” the type of the final product. Must be one of:
    • executable β€” an executable to be run. This is the default, so if you don't say anything you get this one. πŸ’«
    • static-library β€” a static library to link against.
    • shared-library β€” a dynamic library to link against.
    • loadable-object β€” a loadable extension. On most platforms this is literally the same as a dynamic library, but some (Mac) make a distinction between these two. iykyk. πŸ“
⚠️ okay this one matters, listen up: if you first compile for a static library that will later be linked into a shared library, you need to pick 'shared-library' here. not static-library. don't do it. I'm serious. 😭
  • profiles β€” a list of profile that can be used when compiling and linking. One profile comes with this distribution: '@Perl', which sets up the appropriate things to compile/link with libperl. iconic behavior honestly. πŸ’œ
  • include_dirs β€” a list of directories to add to the include path, e.g. ['include', '.'].
  • define β€” a hash of preprocessor defines, e.g. {DEBUG => 1, HAVE_FEATURE => 0}.
  • language β€” the language to use for compilation. Valid values are C or C++. no java bestie, sorry. πŸ™ˆ
  • standard β€” the language standard to use, e.g. c99, c11.
  • extra_args β€” a list of additional arguments to the compiler. go off, add whatever. πŸ”₯
  • type β€” this works the same as with compile.
  • profile β€” this works the same as with compile. (yes it's profile here and profiles up there, that's not a typo, that's just how it is, don't come for me πŸ’€)
  • language β€” this works the same as with compile.
  • libraries β€” a list of libraries to link to. E.g. ['z'].
  • library_dirs β€” a list of directories to find libraries in. E.g. ['/opt/my-app/lib/'].
  • extra_args β€” a list of additional arguments to the linker.

🧚 the file-name girlies (all of them take $basename, $dir = undef)

  • object_file($basename, $dir = undef) β€” given a basename this will return the matching object file name. πŸŽ€
  • library_file($basename, $dir = undef) β€” given a basename this will return the matching shared library file name. πŸ’–
  • static_library_file($basename, $dir = undef) β€” given a basename this will return the matching static library file name. ✨
  • loadable_file($basename, $dir = undef) β€” given a basename this will return the matching loadable library file name. 🌟
  • executable_file($basename, $dir = undef) β€” given a basename this will return the matching executable file name. πŸ‘‘

they all just... tell you the file name. lowkey the most helpful siblings in the whole module. slay. πŸ’…


🌈 AUTHOR 🌈

Leon Timmermans <fawaka@gmail.com> β€” shoutout to the main character who wrote this. πŸ’œ


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. periodt. 🫢


and that's the whole page bestie!! footer vibes for the record: this one's from perl v5.40.2, dated 2026-08-25, and the manpage header does the little ExtUtil...ls::Base(3) name-shortening thing because apparently even perl gets lazy with long names sometimes πŸ˜­πŸ’– mwah, go compile something, you've got this πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from