On Sat, Feb 05, 2011 at 01:27:11PM +0000, Martin J. Evans wrote: > > > >ok, the 3 new trace flags are in and I added macros (slight shame > >you cannot use them in DBI.pm too but not a great deal).
I think they should be added to the ALIAS list in constant(). > All done in DBD::ODBC, tested and committed to trunk for next release. Great. Thanks. > For other DBD authors following this (and assuming it makes the next > DBI release without modification) you can now replace your > dbd_verbose attribute with: > > if (DBIc_TRACE(imp_xxh, DBIf_TRACE_DBD, 0, 3)) { > > which will be true when trace level is > 3 or when someone set the > DBD trace flag. You can see DBD::ODBC's dbdimp.c for how I did it as > until 1.617 of DBI is released the DBIfxxx flags will not exist so I > worked around that for the situation when pre DBI 1.617 is used. I've added the per-method trace flags in r14684. And in r14686 I added a TXN bit and set either CON on TXN on the relevant methods. > The only small issue I have is a small amount of DBI tracing is > output right at the start even when DBD tracing only is set: That should be fixed by r14685. I've not tested any of the above. I'd be grateful if you could test it out. t/09trace.t could be extended for that purpose. (I'm not sure how much effort it would be to keep DBI::PurePerl in sync with this work.) Tim.