On Sat, 4 Nov 2006, ¹ÓÀî§ÂÙ wrote:

Folks,

I have tow problems with SQL::Translator(0.07).


2) 'SQL-Translator-0.07/t/18ttschema-producer.t'
   fails with TT V2.15.
SQL-Translator-0.07/t/data/template/basic.tt
---------------------------------------------------
   38   Constraints
   39       [%- FOREACH constraint = table.get_constraints %]
   40       [% constraint.name OR "?" %]
   41           type:             [% constraint.type %]
   42           fields:           [% constraint.fields.join(', ') %]
---------------------------------------------------

When there is only one filed as test case,
'constraint.fields' will assigned to a 'SQL::Translator::Schema::Constraint'
object itself instead of a list of objects with only one element.

With TT V2.14 which is provided as Debian Gnu/Linux package,
a scalar value promote to one-element  list  for LIST_OPS like 'join'
even if the scalar value is a object.

However with TT V2.15, this  promotion doesn't occur for the object.
Therefore, "constraint.fields.join(', ')" is evaluated to ''
and test fails.


Indeed, I'm not sure which is wrong, 'TT V2.15' or 'SQL::Translator'.
So this is just a information.


This one is a known bug, and it's a 2.15 problem, since they seem to have broken backward compatibility.. and there seems to be no way to force a list, or create a list out of a single object (since it thinks the object is a hashref, and instead listifys the hasref, which just makes a big mess)

I'm inclined to just add skips to the TT tests and some warnings, when TT 2.15 installed, since I'm getting a lot of moans about this.. Any objections?

Jess
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-- 
sqlfairy-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers

Reply via email to