I need to 'upvar' variables from a source
'd file (and I don't know their names)
Let's say I have a TCL file containing:
set v 7
Now this:
proc p {} {
source t.tcl
}
p
puts $v
# => can't read "v": no such variable
The file t.tcl must not be changed.
I also can't have knowledge about the content of t.tcl
. Let's assume it's passed as an env
variable. How do I make v
visible at the top level?