Forum OpenACS Q&A: Re: How do you call a procedure from a different tcl file

Dear Tyge,

since your question is about plain Tcl, it is probably better to ask this question on e.g. comp.lang.tcl.

A short answer is that if you want to call a proc from a script, the proc has to be defined first. One can load procs defined in a script by sourcing it [1] or by defining packages [2].

In the OpenACS-case, the API is preloaded from all the library files into a "blueprint" (containing all procs), which is made available to the requests and background jobs.