Module:...::Object(3)

hii bestie!! this is the Module:...::Object(3) page from the User Contributed Perl Documentation ✨

πŸŽ€ NAME πŸŽ€

Module::Pluggable::Object β€” automatically give your module the ability to have plugins πŸ’…

🌸 SYNOPSIS 🌸

okay so here’s the simple Module::Pluggable use, bestie:

package MyClass;
use Module::Pluggable::Object;

my $finder = Module::Pluggable::Object->new(%opts);
print "My plugins are: ".join(", ", $finder->plugins)."\n";

πŸ¦‹ DESCRIPTION πŸ¦‹

It gives you a simple but, hopefully, extensible way to have 'plugins' for your module. Like, obvi this is not gonna be the be-all and end-all of every solution ever, but it works for me 🫢

Essentially all it does is export a method into your namespace. That method looks through a search path for .pm files and turns those into class names. It can optionally instantiate those classes for you too ✨

This object is wrapped by Module::Pluggable. If you want to do something odd or add non-general special features, you’re probably best to wrap this and produce your own subclass πŸ’…

✨ OPTIONS ✨

see the Module::Pluggable docs for the options, bestie. that’s where the whole option situation lives πŸ’–

πŸ’– AUTHOR πŸ’–

Simon Wistow <simon@thegestalt.org>

πŸŽ€ COPYING πŸŽ€

Copyright, 2006 Simon Wistow

Distributed under the same terms as Perl itself.

πŸ’€ BUGS πŸ’€

None known.

🌈 SEE ALSO 🌈

Module::Pluggable


bye bestie β€” this one came from the perl v5.42.0 docs, dated 2025-01-11 πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from