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

People
Owner: Nobody in particular
Requestors: onken [...] netcubed.de
Cc:
AdminCc:

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
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?
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)