I got the code piece from  Template's manual:

    my $vars = {
        root   => 'http://here.com/there',
        menu   => [ 'modules', 'authors', 'scripts' ],
        client => {
            name => 'Doctor Joseph von Satriani',
            id   => 'JVSAT',
        },
        checkout => sub { my $total = shift; ...; return $something },
        shopcart => My::Cool::Shopping::Cart->new(),
    };


    [% IF shopcart.nitems %]
       Your shopping cart contains the following items:
       <ul>
       [% FOREACH item = shopcart.contents %]
         <li>[% item.name %] : [% item.qty %] @ [% item.price %]
       [% END %]
       </ul>

       [% checkout(shopcart.total) %]

    [% ELSE %]
       No items currently in shopping cart.
    [% END %]



Here, aren't shopcart.nitems and shopcart.contents method calling of
an object like?
So I was thinking designers will be confused on them.

Thanks.
Jenn.

On Thu, Jun 18, 2009 at 10:39 AM, Perrin Harkins<phark...@gmail.com> wrote:
> On Wed, Jun 17, 2009 at 10:36 PM, <practicalp...@gmail.com> wrote:
>> Template::Toolkit is smart enough, but it requires designners to know
>> some syntax about Perl.
>
> How so?  I've often used TT with people who didn't know any perl.  How
> is it more difficult for them than HTML::Template is?
>
> - Perrin
>

Reply via email to