Robert Spier wrote:
The hash is only used to check for validity of the hook name.  If it
helps us, we could split out @hooks and %hooks.

I only said I /thought/ it would work if we could control the order of hook_*...

<later>

Well, it turns out that it mostly works (in that it doesn't recurse), and I had to make C<sub register> into C<sub init> so that the initialization happens before the C<sub hook_logging>. But, then I get lines like this:

Subroutine plugin_name redefined at (eval 24) line 8.
Subroutine hook_name redefined at (eval 24) line 9.
Subroutine init redefined at ./plugins/logging/adaptive line 5.
Subroutine hook_logging redefined at ./plugins/logging/adaptive line 38.
Subroutine hook_deny redefined at ./plugins/logging/adaptive line 65.
Subroutine hook_reset_transaction redefined at ./plugins/logging/adaptive line 
70.

If I tweak hook_logging to not expect the initialization to have happened when it is registered (and go back to using register), I don't get those lines (weird). So there may be something odd about the init() handling still. I've re-reverted the changes to plugins/logging/* and commited a change to Qpsmtpd::Plugin to track hooks as array and hash.

John

Reply via email to