So it seems that if I give the template toolkit an array reference as a parameter
ARRAY_REF => \@array
and then the following code in the template
[% IF ( ARRAY_REF ) %] Do something [% ELSE %] Do something else [% END %]
The else case never fires.
Replacing the parameter code
ARRAY_REF => @array ? \@array : undef;
seems to solve the problem, however, I was wondering if there is a way to make the template toolkit for calculating an empty array (passed through a link) false, because there are a lot of instances in my project, where I believe that this is used (as the pro HTML template worked, as was expected).
Thank you in advance for your help.
perl template-toolkit
cjh
source share