Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

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

I have done this many times. Template::Toolkit might feel like overkill but this is an area where it totally shines because it can handle variables and configuration and macros between templates and such so well. IIRC the Badger book itself was typeset/assembled with TT2. There are even command line tools bundled to do just this sort of thing. See Template::Tools::ttree and Template::Tools::tpage and the tutorial docs.

An aside: never roll your own template engine. We all seem to and it can be fun but unless you are a super smartie, it will ultimately be just a learning exercise because other super smarties have already done it and have lots of devs providing patches, features, docs, samples, etc. The time invested in learning a heavier toolkit will repay you much more handsomely than trying to build one from scratch.


In reply to Re: Assembling text into websites by Your Mother
in thread Assembling text into websites by ggvaidya

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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found