I was trying to stay out of this one, but...

brian moseley wrote:
> % for my $thing (sort @list) {
>    <a href="<% $thing->{url} %>"><b><% $thing->{name} %></b></a>
> % }

[...]

> there are no sophisticated or mysterious constructs in those
> examples...

Just two kinds of data structures, hash de-referencing syntax, and
lexical scoping, and I would probably have passed that list as a
reference too so you'd need to use @{$list}.  Embedded perl is
absolutely the best answer sometimes, but don't underestmate the value
of turning your example into this:

[% FOREACH thing = list %]
  <a href="[% thing.url %]"><b>[% thing.name %]</b></a>
[% END %]

> i argue that for applications, a nice mvc architecture using
> templates with embedded perl is a fine, fine choice.

Yes, and so is an MVC architecture using templates with a taglib of some
sort.  It largely depends on the nature of the project and the people
involved.

- Perrin

Reply via email to