On Fri, Sep 24, 2004 at 02:01:35PM +1000, Cees Hek wrote: > Sounds good to me. The MIDDLE or DONTCARE are really the default, so > they could be eliminated as well. ie specify FIRST or LAST, or leave > blank for the default.
Couldn't MIDDLE/DONTCARE/default be synonmous? That would keep the design in sync with the Apache inspiration while also appeasing Mark's request for more accurate nomenclature. > What this is doing is registering the default hooks. VALID_HOOKS > contains (cgiapp_init cgiapp_prerun cgiapp_postrun teardown), so in > effect we are registering the function 'cgiapp_init' in the > 'cgiapp_init' hook. So when call_hooks is called for the 'cgiapp_init' > phase, the standard 'cgiapp_init' method is also called. But if all the standard callback are being called in the default hooks (not sure if I'm using the right terminology there so let me know if that doesn't make sense), how do you control the order? I thought that was one of the issues under discussion. > >- Would it be true that "call_hooks" could be considered a private > > method? It seems like something a normal users would never use, and > > it would simply the docs a bit to exclude it there. > > Yes, I would think so. However, I can see a plugin adding a new hook > into CGI::App, and hence it would need to call 'call_hook' in that case. Unless we want to keep rehashing these ideas, I think adding call_hook to the docs would be a good idea. Just put it under and Advanced heading or something so that beginners know to stay away from it until they are ready. > If we carefully craft the patch, we could make it possible to have the > hooks system extensible so that new hook locations could be added > through plugins. When you refer to "hook locations," do you mean other than FIRST, MIDDLE/DONTCARE, LAST? Nice work, William -- Knowmad Services Inc. http://www.knowmad.com --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
