Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: When to use templates?

by revdiablo (Prior)
on Nov 19, 2004 at 19:34 UTC ( #409131=note: print w/replies, xml ) Need Help??


in reply to Re: When to use templates?
in thread When to use templates?

Keep everything in one file

There is no reason a template has to be in an external file. With HTML::Template, you can embed your template into the __DATA__ section, and pass DATA as the template filehandle. I do this often, and it works well. I'm sure other template modules have similar methods available.

I tend to think of a template somewhat like a Perl module. Usually, it's cleaner and better to put these things in separate files. Sometimes, though, embedding them into the file where they're used is far simpler, while still retaining much of the benefit of using modules/templates in the first place.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://409131]
help
Chatterbox?
[GotToBTru]: I had to dig into the code to find out where it came from .. and it makes no sense
[GotToBTru]: so I emailed my contact asking if we could just stop sending it .. I'm afraid she is going to ask "what is that anyway?"
[MidLifeXis]: heh.
[MidLifeXis]: Most likely it is a code that some undocumented system, hidden behind layers of IT, deep in the bowels of the building under the machine room floor, reads that code to keep a presence switch from going off. :-b
[MidLifeXis]: I think I forgot "running on a farm of commodore 64, vic 20s, trs 80s, and apple ]|[e systems"
[GotToBTru]: oh I know what it is .. but it is a number only slightly useful to me and of no possible use to our customer

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-01-20 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (176 votes). Check out past polls.