Test::...ggable(3pm)
π 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.$filenameand$srcboth matter, don't get it twisted.$test->write_plugin($package, $src);β same energy, but for a plugin: you pass a$packageand a$srcand she handles it β¨$test->write_manifest();β Write manifest from file list. and the file list means list of file name added by$test->write_fileand$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
- debian trixie: libmodule-build-pluggable-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmodule-build-pluggable-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmodule-build-pluggable-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms