I am fairly new to perl and was wondering if it would be better to use template toolkit or a templating system rather than a here doc? My site is currently using a here doc and xslt transforms for outputting html, its connecting to a sql database and pulling data from there, would it be better for me to move this to a templating system? System is running on windows and using IIS, Asp and activestate perl. The existing system is giving me trouble with how to do certain tasks, like add a navigational menu, since the content is being dynamically generated via xml files I am not sure how to create links into the pages etc. Am I missing something? I can't make the connection on how a templating system such as template toolkit will help with my project, currently it connects to sql database and pulls content out of that dependent on which account is being looked at, how would I utilize TT to do this more efficiently, there are several things I would like to accomplish that i am just stumped on how to pull off, like make links context sensitive for the help files,use seperate "branding" to be supplied by the accounts themselves. I wish there was more of a walkthrough on how to use this, the tutorial is not clear to me, the examples given are overly simple yet the explanation is lacking in detail, I can't even follow it are there any sites that go into more detail with examples you can try yourself etc. I want to use it I really do I just need some help to figure out how.

In reply to templates vs here docs by grashoper

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.