At 11:26 AM 9/4/00 -0300, Nelson Correa de Toledo Ferraz wrote:
>I agree that one shouldn't put lots of code inside of a template, but
>variables and loops are better expressed in Perl than in a "little
>crippled language".
Your example makes perfect sense to me. But that's why I'm in "Tech" and
not "Creative". I wrote my own quick 'n nasty templating package a few
years ago that allowed Perl code to be embedded inside <PERL></PERL>
brackets. So long as I was coding the pages, it worked great, if not as
efficiently as embperl or mason. But in the real world of NYC new media,
Creative typically drives the project. It's more common for the site to be
built by artists and HTML sitebuilders, not programmers. The first time I
see the pages is when they get handed off to Tech to glue it all together.
This usually happens sometime past Tech's scheduled hand-off date, i.e.
five days to do fifteen budgeted days' work in order to make the launch date.
I had more success with Sam's HTML::Template package. The sitebuilders
seemed to better understand how to work with its simpler concept, although
I had to stay away from HTML::Template's looping constructs for the same
reason. No doubt, if there had been better communications and coordination
between Tech and Creative and I'd had more hands-on input on what Creative
was doing to those templates I could have eliminated most of the
screwups. But in practice, I've found turf warfare to be status quo
between Tech and Creative in larger agencies.
My favorite anecdote with embedded Perl templates: after a 100-page
creative update to an existing site, nothing worked. Turned out that some
funky HTML editor had HTML-escaped the Perl code. That was a fun all-nighter.
-----------------------[ http://www.magpie.com ]-------=o&>o-------
Steve Manes
Brooklyn, N'Yawk