Test::...ggable(3pm)

πŸ“¦
version 0.10 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸŽ€ Test::Module::Build::Pluggable πŸŽ€

okay so bestie, this one is from the User Contributed Perl Documentation collection, and it's genuinely such a niche little diva. her whole job? letting you test your plugin. that's it. that's the vibe. πŸ’…


✨ NAME ✨

Test::Module::Build::Pluggable β€” literally just Test your plugin. short. sweet. to the point. she said "my purpose is in my name, iykyk" 😌


🌸 SYNOPSIS 🌸

here's the whole flow, and yes you write it exactly like this:

my $test = Test::Module::Build::Pluggable->new();
$test->write_file('Build.PL', <<'...');
...
$test->run_build_pl();
$test->run_build_script();
# test...

see how she sets up a Build.PL, then runs it, then runs the build script, and only then do you finally get to the actual testing part? iconic sequencing tbh πŸ¦‹


πŸ’– METHODS πŸ’–

every single one, in order, no skipping, we don't do that here:

  • my $test = Test::Module::Build::Pluggable->new() β€” the constructor!! your whole little test object starts here, this is the main character entrance πŸ’«
  • $test->write_file($filename, $src); β€” hand her a filename and a source, and she writes the file. $filename and $src both matter, don't get it twisted.
  • $test->write_plugin($package, $src); β€” same energy, but for a plugin: you pass a $package and a $src and she handles it ✨
  • $test->write_manifest(); β€” Write manifest from file list. and the file list means list of file name added by $test->write_file and $test->write_plugin. so basically: whatever you already wrote with those two methods is what gets manifested. no cap, that's the whole deal.
  • $test->run_build_pl(); β€” runs it. that's the name. that's the method. go off πŸ‘‘
  • $test->run_build_script(); β€” and then this one runs the build script. periodt.
ngl the docs keep these last two super short β€” the signatures are literally all she gives us here, so don't go inventing extra lore about them bestie πŸ™ˆ

🫢 that's a wrap 🫢

this page is from perl v5.40.1, dated 2025-05-04, and it's filed under Test::...ggable(3pm) in the User Contributed Perl Documentation set. slay, go test that plugin of yours πŸ’œπŸŒŸ

πŸ“¦ where this page comes from