One of the places for whom I work uses Perl for all of its development and, when I first joined about 8 months ago, had all the HTML for dynamic pages embedded in the CGI code. My supervisor had tried using Mason before and was unsatisfied with it so I convinced him to give the module HTML::Template a try. We are now in the process of converting the pages in what i believe is a huge step forward. I've been using it for about a year now (started using it for another client), and I really love it. In fact, our adoption of it came in part because we had signed a contract with another website that wanted us to recreate some our pages with their branding and run it on our site. Without adopting separating out the content, I doubt we could have met the terms of the contract in the time period specified and, even if we had, maintenance would have been a pain.

HTML::Template works by inserting tags similar to HTML tags into the HTML document and then importing the document into the cgi, replacing the tags with the relevant data, and outputting revised HTML code. It also supports conditional statements (if..else, unless..else, etc) and loops and supports nesting. All the HTML person would have to know is a handful of template tags, only one or two if you don't need conditionals or loops. We have also used the module in the creation of our HTML emails. If there is any interest, I can post here or on my website an example or two of how I've used it (no guarantees that it will be pretty or the best possible example) but Sam Tregar's article on the SourceForge site has examples. More information can be found at http://html-template.sourceforge.net.

HTH,
Tracy Hurley
programmer - http://www.idofoundation.org
http://www.hurleyit.com

On Jan 18, 2005, at 12:24 PM, Bob Mariotti wrote:

Perhaps some readers can post some small examples of a PHP and/or perl program(s) that actually do what Uri was just stating... that being the separation of text (html) from logic (PHP/perl)?


_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to