Module...d::Tiny(3pm)

πŸ’– Module::Build::Tiny β€” bestie edition πŸ’–

okay so like. this is Module::Build::Tiny, and it's giving "tiny replacement for Module::Build" energy. ✨

version 0.052 btw. write that down. πŸ“


✨ SYNOPSIS ✨

use Module::Build::Tiny;
Build_PL();

that's it. that's the whole vibe. πŸ’…


🌸 DESCRIPTION 🌸

so like, a LOT of Perl distributions ship a Build.PL file instead of a Makefile.PL file, and that file is what drives all the distribution configuration, build, test and installation stuff. and traditionally? Build.PL leans on Module::Build as the underlying build system.

this module is a simple, lightweight, drop-in replacement for that. no cap. 🫢

and bestie, listen. Module::Build has over 6,700 lines of code. this module has less than 200. the way that it still supports the features needed by most distributions?? iconic. πŸ˜­πŸ‘‘

Supported πŸ’–

  • Pure Perl distributions
  • Building XS or C
  • Recursive test files
  • MYMETA
  • Man page generation
  • Generated code from PL files
  • Module sharedirs
  • Dynamic prerequisites

Not Supported πŸ™ˆ

  • HTML documentation generation
  • Extending Module::Build::Tiny

Directory structure πŸŽ€

okay so the layout is NOT a free-for-all, it's very much a vibe check:

  • your .pm, .xs and .pod files must live in lib/
  • any executables must live in script/
  • test files must live in t/
  • dist sharedirs go in share/
  • module sharedirs go under module-share β€” like module-share/Foo-Bar for the module "Foo::Bar"

and the .c files in src/? those get compiled together with the .xs file that matches the distribution name. ✨


πŸ¦‹ USAGE πŸ¦‹

these all work pretty much like their Module::Build equivalents. fr fr.

🌈 perl Build.PL

🌈 Build [ build ]

🌈 Build test

🌈 Build install

and Build install supports the following options:

  • verbose
  • install_base
  • installdirs
  • prefix
  • install_path
  • destdir
  • uninst
  • config
  • pure-perl
  • create_packlist

πŸ‘‘ AUTHORING πŸ‘‘

lowkey this module doesn't support authoring. so if you wanna develop modules using Module::Build::Tiny, the recommended glow-up is to use Dist::Zilla::Plugin::ModuleBuildTiny or App::ModuleBuildTiny. 🫢


πŸ“ CONFIG FILE AND ENVIRONMENT πŸ“

options can be provided in the PERL_MB_OPT environment variable, same way they can with Module::Build. and bestie, do it during the configuration stage. that's the move. πŸ’…

πŸ’€ Incompatibilities πŸ’€

  • Argument parsing

so Module::Build has an extremely permissive way of handling arguments. Module::Build::Tiny only supports a (sane) subset of that. in particular, ./Build destdir=/foo does not work β€” you need to pass it as ./Build --destdir=/foo. periodt.

  • .modulebuildrc

Module::Build::Tiny does not support .modulebuildrc files. and in particular, this means versions of local::lib older than 1.006008 may break with ERROR: Can't create /usr/local/somepath. 😭 so if the output of perl -Mlocal::lib contains MODULEBUILDRC but not PERL_MB_OPT , you're gonna need to upgrade it to resolve this issue. (yes there's a space in there, that's intentional, don't come for me πŸ™ˆ)


πŸ’œ SEE ALSO πŸ’œ

Module::Build


⭐ AUTHORS ⭐

  • Leon Timmermans <leont@cpan.org>
  • David Golden <dagolden@cpan.org>

this software is copyright (c) 2011 by Leon Timmermans, David Golden.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 🫢


and that's the whole thing bestie!! πŸ’–βœ¨πŸŽ€ this was rendered for perl v5.42.0, dated 2025-07-25, from Module...d::Tiny(3pm). slay. go build something iconic. πŸ‘‘πŸ¦‹

πŸ“¦ where this page comes from