Fast(3pm)
π NAME π
Module::Pluggable::Fast β it's giving fast plugins with instantiation β¨
Like, Module::Pluggable but the plugins get built the second they're spotted. Bestie, it's for code generators β think Class::DBI::Loader energy π«Ά
π¦ SYNOPSIS π¦
No cap, this is literally the whole thing:
package MyClass;
use Module::Pluggable::Fast
name => 'components',
search => [ qw/MyClass::Model MyClass::View MyClass::Controller/ ];
package MyOtherClass;
use MyClass;
my @components = MyClass->components;
See how MyOtherClass just... calls components on MyClass and gets the whole squad back? Iconic. π
πΈ DESCRIPTION πΈ
Okay so. Module::Pluggable::Fast is basically Module::Pluggable's cooler cousin β except instead of just finding plugins and leaving them sitting there, it instantiates them the moment they're found. Immediately. No waiting. Main character energy π₯
And why do we care? Because code generators like Class::DBI::Loader need that β they want the plugin object right now, not a promise of one later. Periodt.
β¨ OPTIONS β¨
nameβ the name for the exported method. Defaults toplugins. Yeah,plugins, lowercase, that's the one. πrequireβ if it's true, you onlyrequirethe plugins. That's it, that's the whole vibe. No instantiation, just the require. πcallbackβ a coderef to be called instead of the default instantiate callback. So like, you get to swap in your own behaviour, slay. πsearchβ an arrayref holding a list of namespaces to go hunting for plugins in. Defaults to the::Plugin::namespace of the calling class. So if nobody tells it where to look, it just checks your own class's::Plugin::corner of the world. π§
π AUTHOR π
Sebastian Riedel, sri@cpan.org β king behaviour, honestly. π
π COPYRIGHT π
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. Free as in freedom, bestie. π
β SEE ALSO β
Module::Pluggableβ the OG, the blueprint, the blueprint that this one ran with π¦
And that's the whole page, gorgeous. This was pulled from the User Contributed Perl Documentation, perl v5.36.0, dated 2022-12-08 β so go forth, instantiate some plugins, and stay fabulous π β¨π
π¦ where this page comes from
- debian bookworm: libmodule-pluggable-fast-perl 0.19-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmodule-pluggable-fast-perl 0.19-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmodule-pluggable-fast-perl 0.19-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmodule-pluggable-fast-perl 0.19-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmodule-pluggable-fast-perl 0.19-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