nstcl  >  Documentation  >  nstcl-nssets  >  ad_ns_set_to_tcl_vars

Tcl Powered!

ad_ns_set_to_tcl_vars

NAME

ad_ns_set_to_tcl_vars — Sets variables in the caller's enviroment from the contents of an ns_set

SYNOPSIS

package require nstcl-nssets ?1.0?
package require nstcl ?1.0?

::nstcl::ad_ns_set_to_tcl_vars ?-duplicates duplicates? ?-level level? setId

DESCRIPTION

Takes an ns_set and sets variables in the caller's enviroment correspondingly. For example, if the setId set contained a key/value pair of foo/bar, then the Tcl variable foo is set to bar.

OPTIONAL SWITCHES

-duplicates (defaults to overwrite)
This optional switch defines what happens if the Tcl variable already exists (or if there are duplicate instances of the same key in the setId set). overwrite just overwrites the variable. ignore means the variable will not be overwritten. fail causes an error to be raised (which may help track down subtle bugs due to name clashes).
-level (defaults to 1)
The level to upvar to.

KEYWORDS

ns_set, nstcl, nssets