I've worked with a variety of DNS servers before and i consider my self quit versed with scripting, automation and generating configs and/or changing server behavior on the fly; I would like to have a look at the script that you did earlier.
Although dnsmasq is amazingly light (and is a beautiful piece of software), I wonder what your criteria of selection is; what leaves you unhappy with bind9? I might have a different proposition, one might be powerdns, which uses various backends; including a mysql(or other db) backend, a bind9 files backend and a pipe backend; yet it is quit scalable!
Do you have further aspirations of how this script would be used ? Is it going to run on various machines per users subsets, is the configuration pushed from a central point? are you hoping for this to be managed by users directly in the future?
Depending on how your current script is done, it might be a good starting point, I't would be also relevant if you have particular dependencies that you do not wish to have (perl, database, ..etc). on the other hand recursive DNS setup (that might be dnsmasq as well) and/or split horizon is quit a nice option to separate what is considered a client specific configuration.
I would suggest the following approach:
# Identify more specific requirements based on the environment you have.
# Agree on the techniques and tools that are used to fulfill those requirements
# Provide minimal functionalities/building blocks
Consider this 50% of this project