in reply to Deriving a class from DBI.
(Okay, assume, just for fun, that I wish to log the sql statement.)
Then you'd use DBI's logging facility. Search for trace in the DBI docs.