Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: What is present best practices for lightweight plugins?

by Corion (Patriarch)
on Apr 02, 2012 at 10:34 UTC ( [id://962995]=note: print w/replies, xml ) Need Help??


in reply to What is present best practices for lightweight plugins?

I would consider require for a (very) basic plugin system. If you need anything more than that, I recommend Module::Pluggable and instantiating each plugin as separate object.

For plugin configuration, I haven't seen any good mechanism. I would look at how Dist::Zilla handles it but any plugin mechanism will either have static configuration and a ->visit method that either cancels all following plugins or modifies the visited object or will need some real programming anyway, and when you need real programming, doing it in Perl instead of a configuration file is advisable.

Replies are listed 'Best First'.
Re^2: What is present best practices for lightweight plugins?
by BerntB (Deacon) on Apr 02, 2012 at 11:45 UTC

    Thanks!

    I'll go Module::Pluggable. The code is easy to read and it satisfies the needs without any dependencies at all (good for my use case).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://962995]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2025-11-16 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.