Tony Fraser wrote:
The names work fine for me. They are the same as Apache 2.0 uses, minus the leading HOOK_. Apache 1.3 didn't have that ability you had to fiddle with the AddModule directive order to get modules in the right order, it was a pain. I admit Apache is written in C and this is Perl, but still.
That is exactly where I got the inspiration for this patch. I especially like it, beacuse the mod_perl group has already tried alternatives and moved to this model through experiences with other systems of registering hooks. It ends up being very flexible, and in my opinion simple as well.
In Apache REALLY_FIRST and REALLY_LAST are sort of reserved for special cases; you wouldn't normally use them. That leaves you with FIRST, MIDDLE, LAST where MIDDLE == DONTCARE.
Exactly! The patch automatically registers hooks in the MIDDLE section if the user doesn't provide one, so at the simplest case there should be no confusion.
The order is only important in rare cases, for example: A database connection needs to be closed at the teardown stage, but maybe the session object needs to be flushed at the teardown stage as well... in this case, the order can be important if the session uses the database, so the database would register a hook at the teardown stage as LAST or even REALLY_LAST since it is a special case. I'd be happy enough to drop the REALLY_LAST and REALLY_FIRST sections to simplify things, since I think it would work fine with only 3 options (FIRST, MIDDLE, LAST), or (FIRST, DONTCARE, LAST).
Cheers,
Cees
--------------------------------------------------------------------- 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]
