But, if your not outputting text/plain who cares about newlines in html, xml and the like?
Well, as an example, if the blank line was inside the quotes of an attribute, such as:
That would be bad. However, while this particular case I was converting HTML::Template to TT, where that is mostly not an issue, I was also thinking at the same time of using TT at work where we are generating shell scripts. Extra end-of-line characters can be catastrpohic there.<a href="something.html ">
With plugins you can pull in the power of every perl module into your template.
No doubt you could. Moving the logic in there, however, gives me some eeby-jeebies. It's great if there's a single developer working on non-translated text. It gets a bit uglier if the file, with its code, gets to go out for translation, or if you have someone who knows code great, and another person who can design the heck out of a website. (I'm definitely not in the latter category - I'd love to get my wife doing the site design instead of me... and too much logic in there will just confuse her.) I get the power. I do. But something about it just makes me feel like it's a power that's drawing me to the "dark side" of intermixing logic and layout.
In reply to Re^2: Thoughts on converting from HTML::Template to Template Toolkit
by Tanktalus
in thread Thoughts on converting from HTML::Template to Template Toolkit
by Tanktalus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |