Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 taking refuge in the Monastery: (5)
As of 2024-04-25 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found