Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Let's be precise. TT views are converted to Perl before execution. Seamstress views are manually written before execution. In both cases, Perl code is accessing the model.
TT originally was not this way. It is done now because it helps Template::Tookit execute more quickly based on its current architecture. Template::Alloy, which supports full TT syntax, is different. If you want to compile to Perl for the few cases that it is faster, you can. But Alloy's normal mode of execution is first to generate an optree - which can loosely be compared to a parsed DOM, and then loop through the nodes of the optree, letting nodes pull from the data store as necessary - all without generating any Perl. In essence it is a virtual machine for a simplistic optree language - I am looking forward to making it target Parrot directly someday.

The difference is that one tool automatically generates that Perl and the other makes use of heavily object-oriented Perl to do so.
Well - really the difference is that one requires you to write the heavily object-oriented Perl - the other one writes it for you so even the use of Perl is transparent. And if you use Alloy, then nearly no code has to be written (either manually or automatically) at all to interact with the template.

my @a=qw(random brilliant braindead); print $a[rand(@a)];

In reply to Re: Clarifying the rhandom-perrin attack by Rhandom
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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (7)
    As of 2014-11-01 00:38 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (227 votes), past polls