#%Module
variant foo val1
setenv TS2 [lsort [array names ModuleVariant]]
set ts1 {}
foreach name [lsort [array names ModuleVariant]] {
    if {$ts1 ne {}} {
        append ts1 {:}
    }
    append ts1 "$name=$ModuleVariant($name)"
}
setenv TS3 $ts1
