Subject: | unexpected incompatibility with TT |
I've changed an application to use Template::Alloy instead of TT, and it
seems to be handling everything in the test suite with only 1 exception:
I've been getting the following error:
"undef error - Zero length content"
which I believe I've narrowed down to the following snippet:
[% FOREACH option = self.options %]
[% FOREACH item = option.group %]
[% INCLUDE $self.filename self = option %]
[% END %]
[% END %]
It looks like the "self = option" assignment in the INCLUDE tag is being
done /before/ the "$self.filename" is evaluated - whereas in TT, the
assignment happens /after/ the INCLUDE variable name is evaluated.
The error is occurring because 'filename' is defined in the outer
'self', and not in the 'option' object.
I can work around this for now, by changing the variable name in the
included file, but it'd be nice to know whether this is an intentional
change.
Cheers,
Carl