CPAN::Plugin(3perl)
β¨ NAME β¨
CPAN::Plugin β bestie, it's the base class for CPAN shell extensions π
Okay so real talk: this is the parent class you inherit from when you wanna build your own lil plugin for the CPAN shell. It's giving "starter kit energy" π
π¦ SYNOPSIS π¦
package CPAN::Plugin::Flurb;
use parent 'CPAN::Plugin';
sub post_test {
my ($self, $distribution_object) = @_;
$self = $self->new (distribution_object => $distribution_object);
...;
}
That's literally the whole vibe β you use parent 'CPAN::Plugin' and then you write your own methods. Slay β¨
πΈ DESCRIPTION πΈ
π Alpha Status
Not me having to say this but: the plugin system in the CPAN shell? It dropped in version 2.07 and it is still considered experimental π.
Bestie, "experimental" means exactly what it says. It's not finalized. Things can change. You've been warned, fr fr π
π§ How Plugins work?
Go read "Plugin support" in CPAN. That's where the actual mechanics live. Iykyk π«Ά
π METHODS π
π plugin_requires
returns list of packages given plugin requires for functionality. This list is evaluated using CPAN->use_inst method.
So basically: tell it what packages your plugin needs to actually do the thing, and it hands that list off to CPAN->use_inst to get eval'd. Main character energy β
π distribution_object
Get current distribution object.
That's it. That's the method. It hands you the current distribution object π
π distribution
π« distribution_info
π build_dir
Simple delegatees for misc parameters derived from distribution
Yeah these three are just lil delegating shortcuts β they fetch miscellaneous parameters that come from the distribution. No cap, that's the whole job, and they do it flawlessly π
π
is_xs
Predicate to detect whether package contains XS.
It's a predicate, so it's a yes/no situation β does this package contain XS or not? Obsessed with a clean boolean π§
π«Ά AUTHOR π«Ά
Branislav Zahradnik <barney@cpan.org>
and that's a wrap bestie πΈ this was CPAN::Plugin from perl v5.44.0, dated 2026-10-17, manual page CPAN::Plugin(3perl) β periodt πβ¨
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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