Skip Menu |

This queue is for tickets about the Template-Alloy CPAN distribution.

Report information
The Basics
Id: 39128
Status: resolved
Priority: 0/
Queue: Template-Alloy

Owner: Nobody in particular
Requestors: onken [...]

Bug Information
Severity: Normal
Broken in: 1.012
Fixed in: (no value)

Subject: FOREACH item IN rs.all does not work with rs.all being one element
Download (untitled) / with headers
text/plain 641b
Hi, I'm using DBIx::Class and render items which are in a resultset (rs) with [% FOREACH item IN rs.all %] which works fine if rs.all contains more than one item. But if it contains only one item it gets weired. I cannot understand what happens but it makes a array out of that single value with several hashes. I found out that [% FOREACH item IN @(rs.all) %] works fine for both cases but since I'm migrating from a TT application it pretty lame to change all that .all calls to @(.all). I tried CALL_CONTEXT but if I set it to "list" the app will fail in different places. Did I miss a config option which enables this compatibility?
Download (untitled) / with headers
text/plain 134b
It looks like it fails if the one and only element in a array is a blessed hash. My previous attempt to fix it with @(.) fails, too.
Fixed in 1.013 (just uploaded to CPAN)

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to