Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

way to get perrin's attention!

My situation is very close to yours: a closet full of more or less terrible templating solutions, a strong preference for pipelining and simplicity, and a bias towards readable templates.

I also share your concern about vast machines and tiny tasks, but I've become one of the TT faithful nevertheless. Not because I need everything it does, but because it does everything I need. More than that: it does a great deal that I might need one day. I've benefited from that headroom several times already.

Just one example: I recently shifted a normal sort of "use DBI use Template" application over to a more elegant OO implementation using Class::DBI. Quite unexpectedly, it turned out that where I'd previously been pre-stuffing hashrefs, i could now use TT's marvellous 'lazy' method calls to do exactly the amount of database work that was required to populate a given template and no more. I didn't have to write any code for that purpose - just delete most of what i had - and i didn't even have to change the templates much.

(actually, if you haven't already I'd urge you to check it out: it allows you to write a more or less pipelined system yet put data retrieval and computation completely at the discretion of the template)

I suppose the point is that not only do lots of people share your present needs, they share the future needs that you don't know about yet, and they've already done the work for you...

Which isn't to say that TT is the right solution for you. it's not an easy one to install without root. But I really don't think you should be starting from scratch here.


In reply to Re: I am about to write my very own templating module.. by thpfft
in thread I am about to write my very own templating module.. by Aristotle

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 chanting in the Monastery: (3)
As of 2024-04-26 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found