On Sun, 6 Feb 2011 12:09:35 +0000, Tim Bunce <tim.bu...@pobox.com> wrote:
> On Sun, Feb 06, 2011 at 12:16:33PM +0100, H.Merijn Brand wrote: > > On Sat, 5 Feb 2011 12:29:09 +0000, Tim Bunce <tim.bu...@pobox.com> > > wrote: > > > > > > As you note above, the current trace settings are encoded into an int: > > > > > > # 0xddDDDDrL (driver, DBI, reserved, Level) > > > > > > Where L is the DBI trace level (0-16) and the rest are bit flags. > > > The 4 reserved bits could be used as a driver trace level (0-16). > > > > # 0xddlDDDrL (driver, driver-level, DBI, reserved, Level) > > > > would be perfect in my world. > > That's fine. > > > l than is "level" to DBD, what "L" is to DBI > > > > How many bits in DDDD do you think will ever be used? If we now use 2 > > or 3, wouldn't it be better to change to > > > > # 0xddlDDDrL ? > > > > Which would mean that we stay 100% backward compatible (as the first D > > of DDDD was only reserved but never used. > > Yeap. > > > With this scheme, it is extremely easy for all drivers to update their > > docs to match DBI. Those drivers that used a level will just have to > > use the 'l', those that used flags will (still) have to use the dd. > > > > We could then document the use and support of DBD_VERBOSE to > > automatically translate to the ddl part. If a DBD already supported > > $DBD_VERBOSE instead of "ddl", it will work just as it did, if the DBD > > updates to the new scheme (requiring DBI-1.xxx that supports it), then > > the "upgrade" is automatic and doesn't change a thing from the user > > point of view. > > > > Am I being messy? Or does this all make sense? > > I think it makes sense. > > Thanks. I'll try to come up with a complete patch soon then -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00, 11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.3 and AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/