in reply to Managing Dynamic SQL
My DBIx::SQLEngine would do the trick, as would half a dozen similar modules...