John Peacock said the following on 02/24/2006 11:31 AM:
> Ask Bjørn Hansen wrote:
> 
>>If you add a queue_post I'd like a queue_pre too.  (And then add them 
>>in pairs as we find a use for them elsewhere).
> 
> 
> I was thinking about this (actually I was coding it while I was thinking) 
> [KIDS,
> DON'T TRY THIS AT HOME, I'M A TRAINED PROFESSIONAL!] and queue_pre == 
> data_post
> (i.e. each _pre hook runs at the same point in the transaction as the _post 
> hook
> from the previous phase).  Is there any point in creating the _pre hooks other
> than it being self documenting?  As long as the README.plugins documents the
> order of operation, I don't think the extra hooks buys us anything (other than
> yet another line in the log file that has to be ignored in the ordinary case).

Don't under-estimate "self-documenting". It is much easier to think "I
need to run something before the msg is queued, ah ok, I'll hook
queue_pre" than " ... ah ok, data comes before queue so I need to hook
data_post".

I would prefer to see explicit foo_pre and foo_post hooks.

Also, I've not looked at the code extensively, but do we call the hooks
if they're empty? i.e. will there be anything in the log if the hook is
not hooked?

R.

Reply via email to