Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hey, if it works for you, why not?

I would guess that most people who use HTML::Template do it because they have other people who are not perl programmers but need to work directly on the HTML layout -- no one (least of all the non-programmers) would want non-programmers altering contents of perl scripts just to change the appearance, layout or "static" information of a web page. Or maybe programmers have one text editor mode for perl and a different one for HTML, and it's just easier to do these two jobs in separate text files.

If those situations don't apply to you (you alone are controlling the static layout as well as the dynamic content and you handle HTML editing the way you handle perl editing), then this seemingly contradictory use of HTML::Template is simply a way of organizing your own code to be neater, more compact and easier to maintain -- and easier to adapt later on, if at some point you decide to use HTML::Template in the more usual manner, to keep the code and the layout completely separate.


In reply to Re: html template in a perl script by graff
in thread html template in a perl script by archen

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 scrutinizing the Monastery: (4)
As of 2024-04-20 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found