Welcome to the Monastery | |
PerlMonks |
Re: Synchronizing constants/enums in database and codeby liz (Monsignor) |
on Apr 11, 2004 at 11:35 UTC ( [id://344243]=note: print w/replies, xml ) | Need Help?? |
I would go for 5:
5. Keep the official enumeration in the database; query the database to generate code that contains appropriate constants/enums. Have to make sure your code generation really occurs when the database changes. Could automate this as part of the build/test process. But please note that you don't need to do this as part of the build/test process, but you can also do this at compile time in a BEGIN block. That should ensure that your constants are up to date for each run, as opposed to each build/test cycle. Liz
Update:
In Section
Meditations
|
|