conflicts treats tcl list as string

Bradley Giesbrecht pixilla at macports.org
Mon Nov 11 14:20:07 PST 2013


Is there a better alternative to eval for setting conflicts to a list variable?

set mp.conflicts {c1 c2 c3 c4}

conflicts                    ${mp.conflicts}
foreach mp.conflict $conflicts {
    puts ${mp.conflict}
}
/* returns:
c1 c2 c3 c4
*/

eval conflicts           ${mp.conflicts}
foreach mp.conflict $conflicts {
    puts ${mp.conflict}
}
/* returns:
c1
c2
c3
c4
*/


Regards,
Bradley Giesbrecht (pixilla)



More information about the macports-dev mailing list