I would do something simple in the callback like setting a global variable like $MyDBI::db_needs_reconnecting.
Then have your db fraamework (assuming you have some sort of subclass or wrapper on DBI) open a connection before any db access if that variable is set.
Comment on Re: DBD::Sybase - How to reconnect through err_handler