[Zope3-dev] hook and hookable zcml

Gary Poster gary@zope.com
Tue, 17 Dec 2002 19:53:12 -0500


In the collector, RDM mentions that hook and hookable need unit tests 
(http://collector.zope.org/Zope3-dev/81).  I'll claim this (I'm the 
guilty one--I just did unit tests for the hook registry) *if* folks 
think that hook and hookable are a good idea.

Otherwise, maybe we can readdress the one instance in which they are 
currently used (Component Architecture's getServiceManager) and decide 
on another way to do this.

hook and hookable are ways of setting up explicit monkey patches: you 
declare that something can be monkey patched with "hookable", and make a 
replacement for it with "hook".  You can't hook anything that isn't 
declared as hookable, and you can't hook the same hookable twice.  It 
also gives you a registry which could theoretically give information TTW 
(read-only) on what has been monkey-patched via the hookable/hook mechanism.

So, keep and fix, or trash and regroup?

Gary