My comment on your code is to not use your code and go look at Class::DBI instead. You are reinventing needlessly, unless there's some aspect of your code that solves a particular problem even better than CDBI does it, sacrificing all the common knowledge gained from CDBI's existence and community.