Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: What is present best practices for lightweight plugins?

by Corion (Pope)
on Apr 02, 2012 at 10:34 UTC ( #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


    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?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2021-01-28 16:17 GMT
Find Nodes?
    Voting Booth?