On Wed, 31 Mar 2010 10:14:04 -0700, "David E. Wheeler" <da...@kineticode.com> wrote:
> Fellow DBIers, > > I was just discussing writing a callback on connect () to change > authentication (my correspondent wants to use realm files). But then I > discovered to my disappointment that there is no support for callbacks > on connect (). This makes sense, frankly, since the method is called > before the callbacks are applied, and callbacks execute before the > method, not afterward (at least for now). > > But I've found great use by adding callbacks on connected (), so that > they execute just after a connection. So I was wondering how folks > felt about the idea of adding a connecting () method that executes just > before the DBI tries to connect to the database? I think this would be > a nice complement to connecting (), and instantly make a simple > interface for adding a pre-connection callback, too. > > Thoughts? All in favour, if not only to be able to use $ENV{DBD_VERBOSE} and $ENV{DBI_VERBOSE} to set verbosity on connection before it even starts! -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, 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/