If we're counting hands, it's a bug. This change broke a lot of my code and has no built-in work-around like ".list" to make getting around it easy.

–Ashley
--


On May 29, 2007, at 11:53 PM, Jess Robinson wrote:


Hi Andy,

I've mentioned and poked at this several times since around November, when TT 2.16 came out and produced this problem.

I'd like, if possible, an official response on whether this is a) a bug, and will be fixed (eventually), or b) a feature, in which case please tell me the workaround.

The short description is: If my TT code calls a method that should return a list of objects, and only gets one, it helpfully de- listifies. This is fine except when I wanted to loop around the result, which treats the single object as a hash and gives me the key/value pairs.

For a better description see: http://template-toolkit.org/pipermail/ templates/2006-November/009115.html

For the patch with TEST I sent, see:
http://template-toolkit.org/pipermail/templates/2006-November/ 009115.html

This fixed it for the perl stash, someone else will need to poke the XS one..

Where it's turning up is in the SQL::Translator tests, which fail for all TT versions > 2.15.. I added a skip to ignore them if TT == 2.16, but that has now started failing since subsequent releases still have the bug/feature.

Thanks,
Jess


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to