I have a bit of a chicken and egg problem here. If I could write such examples, I'd have answered my own question and could just go ahead and build the classes to support the examples. My hindrance is that I am still struggling with some fundamental decisions. The most promising is to code a web page in Perl as a list of nested objects to match XML structure, each of which may have hooks into database tables, CSS and javascript routines. The support for transferring the inline code into separate sources for each language could be achieved by multiple inheritance. One of the challenges is where to draw the line between declarative and procedural code. One of the concerns is ... would I be re-inventing Template Toolkit?