[Templates] Order of evaluation

Andrew Beattie andrew@tug.com
Thu, 21 Nov 2002 13:23:08 -0000


>> $$vars{'columns'} = $columns;
>> $$vars{'body'} = \&get_body;
>
>Can you not call get_body() to populate the hash before calling TT?
>
>$vars = {
>   columns => $columns,
>   body    => get_body(),
>};

Ah!  That's exactly what I wanted.

I was ignorant of the difference between \&get_body and get_body().

I did previously have a look for the exact meaning of \&, but:
 - my camel index lists many different combinations of punctuation
   characters in the index but  \& isn't one of them
 - googling for: function or \& at site:www.perldoc.com isn't helpful
 - I havn't got my head around perldoc well enough to know where to look.

Thanks

Andrew