Module...::Base(3pm)
π NAME π
Module::Build::Pluggable::Base β bestie, it's the base object for plugins β¨
πΈ SYNOPSIS πΈ
package My::Module::Build::Plugin;
use parent qw/Module::Build::Pluggable::Base/;
π¦ DESCRIPTION π¦
Okay so real talk: this is an abstract base class for Module::Build::Pluggable. You don't instantiate it yourself, you inherit from it and it does the heavy lifting. It's giving scaffolding, it's giving foundation, it's giving main character energy for your plugin π
π METHODS π
$self->builder_class() : Str
Gets you a class name for Module::Build's subclass. Very demure, very class-name-y π
π¨ NO CAP: you cannot call this method in theHOOK_prepareandHOOK_configurephase. Like, do not. It will not slay. Periodt.
$self->add_before_action_modifier($action_name: Str, $callback: Code)
$self->add_before_action_modifier('build' => \&code);
Adds a 'before' action method modifier. It runs your thing before the action, iykyk π
β You need to call this method in the HOOK_build phase. That's the vibe check.
$self->add_around_action_modifier($action_name: Str, $callback: Code)
$self->add_around_action_modifier('build' => \&code);
Adds an 'around' action method modifier β you wrap the action, you contain it, you ARE the moment π«Ά
β You need to call this method in the HOOK_build phase too. Same energy.
$self->add_action($action_name: Str, $callback: Code)
Adds a whole new action for Module::Build. Brand new action, brand new era π
β Guess what phase. Yep. HOOK_build. You need to call this method there.
$self->build_requires($module_name:Str[, $version:Str])
Adds a build dependenc(y/ies). Feed it a module, optionally feed it a version, it ate π
β You need to call this method in the HOOK_configure phase, bestie.
$self->configure_requires($module_name:Str[, $version:Str])
Adds a configure dependenc(y/ies). Same deal: module name required, version is optional and lowkey iconic πΈ
β You need to call this method in the HOOK_configure phase. Got it? Got it.
"$self->log_info($msg: Str)"
Outputs log at the INFO level. Just chilling, just informing β¨
"$self->log_warn($msg: Str)"
Outputs log at the WARN level. Not a full crisis, but like... worth a look π
πΈβ¨π and that's the whole page, babe! This lil' doc came to you courtesy of the User Contributed Perl Documentation, running on perl v5.40.1, dated 2025-05-04. Go build something iconic π¦π π
π¦ 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