you can give the DBI handle an error handler:Errr... I don't really get it, how is this code supposed to work? won't it pass any warning to the sub, not only the dbh warnings ?
$h->{RaiseError} = 1; # Turn all warnings into dies
$h->{HandleError} = sub { set_dberror(join('',@_)) };
Any errors generated by the dbh will be passed to your sub.
In reply to Re^2: Problem of scope : $SIG{__WARN__} in a module...
by wazoox
in thread Problem of scope : $SIG{__WARN__} in a module...
by wazoox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |