$h->{RaiseError} = 1; # Turn all warnings into dies $h->{HandleError} = sub { set_dberror(join('',@_)) };