Depends what you mean by "programming". You need more than conditionals and iteration of preexisting lists to be able to do general programming. Petal does not give you a turing complete language or anything like it. It simply gives you a way to render a perl data structure in HTML, adding the ability to render lists as repeated HTML and to conditionally drop certain sections of the template.

That is not programming. For example, the rendering is guaranteed to terminate and while it is possible to set variable and keep state, this is rarely done - the only time I'd ever do it would be to make a short way of referring data at the end of a very long path expression.

I guess it comes down to taste, I really like Petal's style of doing things.


In reply to Re: one does program in the HTML with Petal by fergal
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.