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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

When I first had to choose a templating scheme for our company, I investigated several options. HTML::Template and Template Toolkit were the two most likely candidates. Even though HTML::Template could have satisfied our needs at the time, I was concerned that, with some of the projects we were planning, that it might become a bottleneck. On the other hand, if we took the trouble to learn Template Toolkit up front, we would have a vastly more powerful templating system available, albeit with potential that we were not tapping.

flash forward almost two years

Many people use templates by creating a program, assembling the data, then calling the template and passing it the data. For my current project, I need to create documents out of multiple templates all tied together, some with dynamic content from a variety of different sources. As a result, I am inverting the process and having templates call programs (plugins). This allows me a much richer templating environment. I don't think I could have done that very easily with HTML::Template.

If your documents are not likely to be terribly complicated, HTML::Template is a fine tool.


Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

In reply to (Ovid) Re(2): Dynamically altering static TT templates by Ovid
in thread Dynamically altering static TT templates by Ovid

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 or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2021-10-16 13:02 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (69 votes). Check out past polls.