From: Rafael 'Dido' Sevilla Date: 2002-11-22T18:22:36+09:00 Subject: Re: perl with HTML::Mason or Ruby with Eruby ?? On Fri, Nov 22, 2002 at 12:35:36AM +0900, Markus Jais wrote: > hello > > I told a friend how cool Ruby is and he imediatelly liked it. > but now he switched to Perl again because of HTML::Mason > (http://www.masonhq.com) > > I am now Mason Guru and told hin that there is Eruby. > but Mason seems to have more cool features like Eruby (according to him). This Freshmeat article has some ideas I actually used to separate HTML generation from the actual business logic of CGI scripts. I incorporated some ideas into code that went into a fairly complex CGI script I once wrote. http://freshmeat.net/articles/view/447/ It's not flexible enough to provide complete separation (I had to generate a little HTML for things like tables), but it was able to accomplish the job well enough. I'm working on further extending the ideas here to add conditionals and iterators for web page templates. I imagine we'd have something like:

condition is set

condition was not set

Condition value is:

AB
An would just test the variable given and then output the text inside or depending on whether the variable is true or false. will simply be substituted by the value of the variable given. effectively runs an iterator method associated with some object, binds some local variables (the values yielded by the iterator), and repeatedly outputs its children until the iterator is spent. I'm working on writing this right now... -- Rafael R. Sevilla +63(2)8123151 Software Developer, Imperium Technology Inc. +63(917)4458925