in reply to writing DBI applications offline

I recently had great success with DBD::Mock. Have a look.