Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Code and html separation - always or mostly doable?

by revdiablo (Prior)
on Jun 16, 2004 at 17:36 UTC ( [id://367329]=note: print w/replies, xml ) Need Help??


in reply to Re: Code and html separation - always or mostly doable?
in thread Code and html separation - always or mostly doable?

I can't validate my code in BBEDIT because it stumbles over all the H::T stuff. A bit frustrating

HTML::Template allows you to put your TMPL_VAR, TMPL_LOOP, and other directives inside HTML comments, e.g. <!-- TMPL_VAR NAME=foo --> is the same as <TMPL_VAR NAME=foo>. Unless your HTML editing tool mangles comments, this should allow you to have your cake and eat it too.

HTH

Replies are listed 'Best First'.
Re^3:Code and html separation - always or mostly doable?
by bradcathey (Prior) on Jun 16, 2004 at 18:10 UTC
    True facts, revdiablo, but as I pointed out in my orig. reply, the H::T manpages state that the commented directives have a negative effect on bandwidth (but I might be misunderstanding their comment). I prolly should run some of my own tests. Thanks.

    Update: Per revdiablo's reply, below, the comment issue is one I need to look into, both for validation and readibility issues, aforementioned.

    —Brad
    "Don't ever take a fence down until you know the reason it was put up. " G. K. Chesterton

      The template directives are removed before the page is actually sent over the network, so I don't see how it would have any effect on bandwidth, one way or another. As for the comment in the POD about "dramatic savings in bandwidth," I believe they are making a joke. The size of the POD would be dramatically smaller without using comment-style directives, thus saving huge amounts of bandwidth transmitting the documentation.

      Update: for what it's worth, when I wrote my first reply, I did miss the part of your original post where you mention the comment-style directives. I apologize for that, but hopefully this post will reassure you of their use in the future.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://367329]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-20 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found