Registering Tcl Procedures

The CMS applications with Tcl interfaces provide the administrator with a Tcl interpreter in command-line mode (command-line argument -single). The instructions and procedures executed in this interpreter have complete access to the system.

Normally, users who use a Tcl shell to connect to the Content Manager or the Template Engine should not have complete access to the system. For this reason, all procedures which are to be executable in the Tcl shell need to be registered explicitly. This is done by using the safeInterp procedure:

safeInterp alias serverProc clientProc

Using this ccommand, the serverProc server procedure is registered under the name clientProc and made available in Tcl clients.

The getRegisteredCommands procedure supplies the name of all procedures which a Tcl client should forward for execution to the Tcl server. In standard installations, this procedure is called in the start script of the Tcl client.