Josh_B_152229
May 20, 2015Nimbostratus
Calling procs dynamically
I have successfully tested calling procs like this:
eval call [string tolower {HTTP::host}]::procName
However, I'm trying to stop using HTTP::host directly because the TCL checker freaks completely out thinking things are out of context when this type of call is defined outside of an event. I understand that and am trying to work around it by using
set host [string tolower [HTTP::host]]
and all kinds of other dumbness. I'm not expanding/unpacking the variable properly. All of the following fail:
call $host::procName $arg1 $arg2
eval call [string tolower {$host}]::procName $arg1 $arg2
eval [call {$host}]::procName $arg1 $arg2
However, as expected, using
actualValueInHostVar::procname $arg1 $arg2
works perfectly. I know that someone out there can set me straight on this.
Thanks.