On Thursday, August 22, 2002, at 07:17 AM, David Wheeler wrote:
> + # XXX add $attr{HandleError} logic here? Yes!
> + $attr->{HandleError}($msg, $drh, $dbh)
> + if UNIVERSAL::isa($attr->{HandleError}, 'CODE');
>
D'oh! Did it again! Here it is with the arrow operator, as per your
comments about pre perl5.6.
--- DBI.pm.org Wed Aug 21 21:09:27 2002
+++ DBI.pm Thu Aug 22 07:17:22 2002
@@ -503,7 +513,9 @@
unless ($dbh = $drh->$connect_meth($dsn, $user, $pass, $attr)) {
my $msg = "$class->connect($dsn) failed: ".$drh->errstr;
if (%attr) {
- # XXX add $attr{HandleError} logic here?
+ # XXX add $attr{HandleError} logic here? Yes!
+ $attr->{HandleError}->($msg, $drh, $dbh)
+ if UNIVERSAL::isa($attr->{HandleError}, 'CODE');
Carp::croak($msg) if $attr->{RaiseError};
Carp::carp ($msg) if $attr->{PrintError};
}
Thanks,
David
--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: [EMAIL PROTECTED]
DBI.patch
Description: Binary data
