You know, I inherited a web site and Perl code base that used a lots-of-code-in-the-db design (my predecessor had been fired for exceptionally irregular hours, and left behind no documentation) and I really disliked every bit of figuring it out and maintaining it. It's so much fun when out of 100 tables in a single MySql database, 95 contain data, some data changing by the second, and the remaining 5 contain everything from SQL queries to javascript to form letter code written in Perl.
All it would have taken was one data accident that nailed the database instance, and the *code* to the application would have been lost.
Comment on Re: Perl variable names stored in mysql fields
I always thought that some applications like Wordpress (I know it's in PHP but the concept is similar) did something similar to this - but I realize it's more likely a combination of templates and DATA stored in the database.