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