> Looks good, except it might be useful to log that at the debug level, e.g.
> if ($plugin->can($hooksub)) {
> # can't call ->log() directly because it assumes it's inside a hook
> $plugin->varlog(LOGDEBUG, $self->plugin_name, " hooking ", $hook);
> $plugin->register_hook( $hook, $hooksub );
> since it is a useful bit of information to grep for all plugins
> hooking a particular hook, and with the current plugin loading scheme,
> it only happens once (as long as you are not running under
> tcpserver).
A better place to put that, for your goal, is to add it to
register_hook... So I have.
> I'd prefer, if you are actually adding the sample plugin, that it be
> "good" code that someone can use to write a new plugin. I've tried to
> eliminate all instances of warn() from the core (I see there are a
> couple more I need to get) except from within a logging plugin, so
> that all output from the code is controlled.
Of course. That was just an example for the list.
-R