Jean-Michel Hiver writes:
> > I wonder how much code you would save if you wrote the templates in
> > Perl and let the Perl interpreter do the above.
> 
> I recommend that you read this Page:
> http://www.perl.com/pub/a/2001/08/21/templating.html?page=2

Please read the Application Servers section of:

http://www.bivio.biz/hm/why-bOP

> I'm an OO-advocate, I believe in proper separation of logic, content and
> presentation

Moi aussi.  What does this have to do with using Perl for business
logic and presentation logic?

> and on top of that I want people to be able to edit
> templates easily in dreamweaver, frontpage, etc
> and send templates thru
> HTML tidy to be able to always output valid XHTML.

If you are an OO-advocate, you would hide the presentation format in
objects, e.g. Table, String, and Link.  This ensures the output is
valid through the (re)use of independently tested objects.  Objects
also provide a mechanism for overriding behavior.

> Petal lets me do that. If that's not of any use to you, fine. The world
> is full of excellent 'inline style' modules such as HTML::Mason,
> HTML::Embperl and other Apache::ASP.

These all work on the assumption that the template is written in HTML.
If you start with OO Perl, you do not "inline anything", not even
the HTML.  Here is an example page:

http://petshop.bivio.biz/items?p=RP-LI-02

And here is the HTML-less source:

http://petshop.bivio.biz/src?s=View.items

Apologies to those who are tired of the *ML vs. Perl debate.

Rob


Reply via email to