Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-03-19 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found