Added ping_resource subroutine for $dbh, fixed warning.

Hello, I created ping_resource subroutine, and fixed warning on reconnect. Is that fix correct? Do I understand correctly?

Thanks.