Matt Sergeant wrote:
If it's just a re-defined warning, why not fix the plugin compiler to
not recompile if they've already been loaded? I think I have a patch for
that as part of high_perf, fwiw.
The redefined warning is just a symptom of the larger issue that the transaction
object doesn't have any way to access the already cached plugins. The regular
plugins already don't recompile more than once; it is only the logging plugins
that wind up doing that (because they go through a slightly different route to
keep from logging while loading).
You are basically proposing my option #2:
2) Create a global logging object that everything can use (instead of binding
the logging to the top level object).
Which I tried and abandoned when I implemented the logging plugins. I don't
remember exactly why. ;-) Perhaps I should try it again.
Oh, and if your patch was applied, the following line could go away:
$self->log(LOGWARN, "Plugins already loaded") if $self->{hooks};
since it would never be true...
John