[Catmail] Making it pluggable

Terence Monteiro terence at deeproot.co.in
Fri Sep 12 09:22:50 BST 2008


Jose Luis Martinez wrote:

>     Pluggability should be built into catmail. I think that a pluggable
> app should have pluggability as a core feature, and not just a set of
> callbacks, or points where plugins should be called, because the
> developers will never get right where people want to plug in or change
> the default behaviour.

I agree.

> It looks like Local, RegEx and other plugin actions would have to be
> developed for completeness. So you would have PluginBeforeLocal,
> PluginAfterRegEx, etc. Maybe the Cat ones could somehow be used so the
> pluggability plugin would not have to maintain separate versions.

Since a pluggability module will only need to identify uniquely which
action it wants to be called before or after, I think it may not be
necessary to provide PluginBeforeLocal and so forth. $c->forward requires
no identification of the type of action to which you are forwarding. So
calling the correct action should not be a problem.

I'm not sure I understand what you mean here. Does PluginBeforeLocal mean
the plugged in action is itself a Local action? If so, consider the
following syntax:

  sub do_something : Local PluginBefore('/an/action') {

This way, the plugin writer indicates both the type of action and the
action before which it should be called.

Or do you mean the action it gets called before is a Local action?

Thanks and Regards,
Terence Monteiro.

DeepRoot Linux,
Ph: +91 (80) 4112 4781 / 85.

More information about the Catmail mailing list