Callbacks registered on class, not instance?

Michael Ludwig <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <20120709103627.GR4564@Dago>
There's a huge perl process running, and we don't have access to the
source code. We only have access to a loader script, which starts the
entire process.

This process is doing lots of SQL via DBI. We'd like to change that SQL
a little bit. This can be done via DBI callbacks as described in the
manual:

http://search.cpan.org/~timb/DBI-1.622/DBI.pm#Callbacks

Callbacks are registered on DBI object instances. When the process is
started we don't have access to handles, they have not been created yet.

However, in theory, we could load the DBI module in the loader script
so the DBI code would be there, and then we could register callbacks on
the *class*, not on the *instance*, and they would be called *from* the
instance. In other words, global callbacks.

In practice it looks like this isn't supported. Or is it?

Michael
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.