CPAN::Plugin(3pm)
π CPAN::Plugin β the base class era π
ok so this is CPAN::Plugin, bestie β it's the base class for CPAN shell extensions. literally the blueprint, the template, the main character that all your cute little plugins inherit from. it's giving "parent energy" fr fr β¨ (and yes, it's a Perl Programmers Reference Guide page, which is why it's sitting here being all official π)
β¨ SYNOPSIS β¨
ok so here's the vibe β you make a package, you parent it up, and you define your hook:
package CPAN::Plugin::Flurb;
use parent 'CPAN::Plugin';
sub post_test {
my ($self, $distribution_object) = @_;
$self = $self->new (distribution_object => $distribution_object);
...;
}
that's it. that's the whole skeleton. post_test is where you do your thing π
πΈ DESCRIPTION πΈ
π¦ Alpha Status π¦
so the plugin system in the CPAN shell? it showed up in version 2.07 and it's still considered experimental. yes bestie, experimental β act accordingly, don't be weird about it π
π§ How Plugins work? π§
ok so for this one you gotta go read "Plugin support" in CPAN. that's where the whole story lives. go, read, come back π«Ά
π METHODS π
plugin_requiresβ returns the list of packages that the given plugin requires for functionality. this list gets evaluated using the"CPAN->use_inst"method. so like, it's the plugin's shopping list and CPAN's the one doing the checkout πdistribution_objectβ get the current distribution object. that's it, that's the whole thing. iconic behaviour honestly β¨distributionβ delegatee, see below πdistribution_infoβ delegatee, see below πbuild_dirβ simple delegatees for misc parameters derived from the distribution. so these three are just lil shortcut girlies passing stuff through for you, no cap πis_xsβ predicate to detect whether the package contains XS. returns truthy/falsy vibes. it's the vibe check for XS π₯
π AUTHOR π
Branislav Zahradnik <barney@cpan.org> β the author, the legend, the icon π
okay bestie that's the whole page, no notes π
and that's a wrap, luv u, bye~ π this was perl v5.42.3, dated 2026-11-03, aka CPAN::Plugin(3pm) β see u in the next manpage, mwah ππ
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms