> From: Matthew Wickline [mailto:[EMAIL PROTECTED]] > > Would folks be interested in the option of specifying a > coderef for the > RaiseError option? > > you might then have: > > $dbh = DBI->connect( > $dsn, $user, $password, > { RaiseError => \&bug_out, AutoCommit => 0 } > ); > sub bug_out { > # log stuff, send email, run around in circles, > # etc > }
> This sort of thing would seem to be backwards compatible, > while offering > additional programmer flexibility (and maybe getting rid of > the need to > use eval in some cases?). I'm not saying I'd definitely use it, but it sounds like a nifty idea, you might still use eval, which would be caught by having your error handling sub die or croak at the end, but you could do neat things like having different logging/error handling routines for different database handles (or even different statement handles). -Douglas Wilson