Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: HTML::Template's watchful eye

by izut (Chaplain)
on Jun 24, 2005 at 19:21 UTC ( [id://469806]=note: print w/replies, xml ) Need Help??


in reply to HTML::Template's watchful eye

I think it is the correct behavior. I think HTML::Template first compiles your template to some Perl code, and then executes it. If it can't find some include, open() will fail.

surrender to perl. your code, your rules.

Replies are listed 'Best First'.
Re^2: HTML::Template's watchful eye
by Tanktalus (Canon) on Jun 24, 2005 at 21:49 UTC

    Close. You're thinking of something more like Text::ScriptTemplate which compiles to perl code, then executes it.

    HTML::Template does "compile" the template, but to an internal data format which it then can save (to disk, shared memory, whatever). Since this phase doesn't look at the passed-in variables, it doesn't know that the if clause is false. It very well could be true next time, and next time we may not even look at the templates because we'll reuse the template that is pre-compiled, all for speed.

    And that's the overwhelming idea with HTML::Template - speed. It has many options on caching, just to try to get the right amount of speed from your system.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found