Robert Spier wrote:
I'm thinking of using something like the code in isa_plugin() to
create pre-compiled plugins which can then be dispatched from a common
hook_queue() call in the conditional_queue plugin.

Why not just wrap all your queue plugins (using the inheritance) and
use the normal DECLINE/OK stuff?

Because I may want to have multiple inheritance (which Perl isn't known for handling well). How can I say that my plugin isa(smtp-forward, qmail-queue, qmail-qmqpc) and have control over which order hook_queue is called in? I may also have multiple instances of smtp-forward, depending on the recipient and a single e-mail might need to call multiple queue methods.

I was planning on using the same sort of "create a new class from the old class" methodology as isa_plugin() uses, just storing the resulting plugin objects in a cache inside $self instead of making them first class objects (i.e. I wouldn't tie them in using the regular hook stack).

John

Reply via email to