fergal sayeth:
If you want to avoid programming in your HTML files and you want HTML that can be previewed and editted in HTML tools then Petal is there already.

Your second point I agree with: Petal does maintain HTML that can be previewed and edited in HTML tools.

But I disagree with your first point. I think Petal allows for programming in HTML. Sure the syntax of the programming language looks a bit different, but it's still programming in my book. And in a previous post you literally said: "petal's loops" --- now since you said that Petal had loops and since loops are a programming construct, you can program in petal...

begin round two of fergal versus princepawn :) -- round one took place here

Let's compare HTML::Seamstress, Template and Petal briefly:

condition

petal

<span tal:condition="true:user/is_authenticated"> Yo, authenticated! </span>

tt

[% IF user.is_authenticated %] Yo, authenticated! [% END %]

seamstress

<div class="auth_dialog"> <span sid="authed"> Yo, authenticated! </span> <span sid="not_authed"> NOT authed </span> </div>
use html::auth_dialog; my $tree = html::auth_dialog->new; $tree->highlander (auth_dialog => [ authed => sub { $_[0]->authenticated } not_authed => sub { 1 } ], $model ); print $tree->as_HTML;

loop

petal

<tag tal:repeat="element_name EXPRESSION"> blah blah blah </tag>

tt

[% FOREACH s IN EXPRESSION %] * [% s %] [% END %]

seamstress

There are a number of looping methods abstracted into HTML::Element::Library for use with Seamstress in a disciplined object-oriented fashion...
<div class="elemid"> blah blah blah </div>
my $li = $tree->look_down(class => 'elemid'); my @items = qw(bread butter vodka); $tree->iter($li => @items);
I have beheld the tarball of 22.1 on ftp.gnu.org with my own eyes. How can you say that there is no God in the Church of Emacs? -- David Kastrup
[tag://html,templating,seamstress]
Enforce strict model-view separation in template engines via HTML::Seamstress The car is in the cdr, not the cdr in the car

In reply to one does program in the HTML with Petal by metaperl
in thread RFC - Template::Empty by redhotpenguin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.