-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't iterate on CONSTANTS #207
Comments
This looks like a syntax error. Try You probably get a quicker answer to this type of question on stackoverflow: https://stackoverflow.com/questions/tagged/template-toolkit |
That doesn't work either.
Output: |
Then your Perl code that invokes the template processor has a bug. Please post it here. You are doing something like: $constants->{foo} = @items; When you should do: $constants->{foo} = [@items]; If that doesn't help, please post your complete code or a reference to it. This here works, by the way:
|
I appreciate all your help here, @gflohr! This is what I'm using:
|
Sorry, I didn't even know about the options |
Any thoughts on this? This seems like a bug. |
I am having trouble iterating on CONSTANTS.
If I pass in:
CONSTANTS: { foo => [1, 2, 3] }
Then:
Should print:
Instead, it just prints:
3
Interestingly,
[% foo.first %]
works. I'm seeing the same problem iterating hashrefs.What am I missing about CONSTANTS behaviour?
The text was updated successfully, but these errors were encountered: