source/module.tcl
Procedure Summary |
$name { {$arguments} } |
available { } |
bgexec { args } Wrapper for bgexec. |
Catch { level body {msg {}} } Convenience procedure that catch and logs |
command { name arguments body } 'proc' wrapper for command handlers, to catch and properly log erros. |
exec { args } Wrapper for |
ferror { explanation index } Print an error message with an indication of the erroneous word and generate an error in the context of the caller. |
getall { argname } From a list named "arguments" in the context of the caller, find and return in the order they appear, all the values of all the instances of key $key. |
getpos { argname {index 0} } Find the position on the command line where the value for the argument name $argname appears. |
getval { argname args } |
init { } Set-up Module |
loadall { } Load as many modules as possible from the available ones. |
loaded { } Return all loaded modules in order of first to last |
OnError { level {name {}} } Convenience procedure that catch and logs |
OnError_leave_trace { args } |
provide { name {ver {}} } Declare that a module is provided. |
ptyexec { args } Wrapper for ptyexec. |
puts { args } |
reloadall { } Reload all module code. |
require { name args } Load a required module, and its dependencies. |
reset { name } Initialize a module's configuration state. |
resetall { } Initialize the configuration state of the whole system (all loaded modules). |
seval { script } Evaluate a script like "eval" but on a Session interpreter. |
version { name } Return the version of a loaded module. |
Procedure Detail |
proc $name { {$arguments} }
proc available { }
proc bgexec { args }
proc Catch { level body {msg {}} }
level
- Syslog level: Debug Info Notice Warning Error Critical Alert Emergency.
body
- The body of code to evaluate on calling scope.
msg
- Additional error message to display before that generated by 'error'.
proc command { name arguments body }
proc exec { args }
proc ferror { explanation index }
explanation
- Explanatory text of the error.
index
- List index of the erroneous word. Can point after the list.
@error
proc getall { argname }
key
- The name of the key, which values will be looked for.
proc getpos { argname {index 0} }
argname
- The argument name whose possition we are looking for.
index
- If multiple arguments with $argname name, return the $index one. (zero-based).
proc getval { argname args }
proc init { }
proc loadall { }
proc loaded { }
proc OnError { level {name {}} }
level
- Either "Ignore" or a syslog severity level: Debug Info Notice Warning Error Critical Alert Emergency. If "Ignore" then errors will not be logged at all.
name
- Optional. The name of the proc to apply OnError on. This name is resolved according to namespace rules.
proc OnError_leave_trace { args }
proc provide { name {ver {}} }
args
- Same as in "package provide".
proc ptyexec { args }
proc puts { args }
proc reloadall { }
proc require { name args }
args
- Arguments according to the syntax specification above
proc reset { name }
name
- Name of package
@error
proc resetall { }
proc seval { script }
args
- Same arguments as "eval".
@returns Same as "eval".
proc version { name }
mod
- Name of package