|
Posted by Scott Bryce on October 12, 2007, 3:06 pm
Please log in for more thread options cartercc@gmail.com wrote:
> Okay, I'll look at it, but I don't agree that using heredocs mixes
> HTML and code, but does just the opposite.
Heredocs are contained within code. HTML::Template puts the HTML in a
separate file.
> I think that the ideal is to completely separate your user interface,
> the programming logic, and your data.
HTML::Template will allow you to completely separate your user interface
from your logic/data.
> The user interface consists of
> your presentation information (CSS) and your document markup (HTML).
> There are two ways to do this. You can mix your programming logic in
> with your HTML, like JSP or PHP. Or, you can mix your HTML in with
> your programing logic, like the traditional CGI. I have a strong
> distaste for the first method born of experience.
I have a distaste for either one. HTML::Template provides a third method.
> I like to code HTML snippets and put them in a Perl module.
How about putting them in an HTML file? Read the docs. It is a different
way to work than you are used to, but I think you will see the advantages.
|