There's more than one way to do things | |
PerlMonks |
Re^3: Best practices: Generating HTML contentby dsheroh (Monsignor) |
on Dec 26, 2017 at 10:09 UTC ( [id://1206194]=note: print w/replies, xml ) | Need Help?? |
Does the larger project involve "larger chunks of code", of the sort you've moved to templates for? Probably.
Does the larget project, therefore, use templates? Hopefully. If so, then using the same templating system in this module as in the larger project isn't pulling in anything new, it's just using what will already be loaded as a part of the overall project. And, if not, I wouldn't let that stop me from maintaining a clean separation of concerns by using templates in the module anyhow. On the contrary, I'd start with templates in the module, since that appears to be where you're currently writing new code, then expand from there until all of the HTML content in the entire project is produced using templates instead of coming from mixed HTML and Perl frankencode.
In Section
Seekers of Perl Wisdom
|
|