Hello,
I've noticed some strange behavior in AOLServer when renaming the proc
command. I put the following example stub definition in the tcl
library before the rest of the library loads:
rename proc _proc
_proc proc {proc_name args} {
set proc_namespace [uplevel {::namespace current}]
if { $proc_namespace != "::" } {
regsub {^::} $proc_namespace {} proc_namespace
set proc_name "${proc_namespace}::${proc_name}"
}
set procdef [list _proc $proc_name]
eval [concat $procdef $args]
}
My tcl library loads fine, but when I try to load a page, I get the
following errors in my log (and a page error):
[06/Feb/2005:14:39:01][2824.25187840][-conn:web2-users::0] Error:
invalid command name "proc"
invalid command name "proc"
while executing
"proc ::load {args} {
set libfile [lindex $args 0]
for {set i 0} {$i < [llength $::_pkglist]} {incr i} {
set to..."
[06/Feb/2005:14:39:01][2824.25187840][-conn:web2-users::0] Error:
invalid command name "ns_sourceproc"
invalid command name "ns_sourceproc"
while executing
"ns_sourceproc {}"
It seems like the 'rename' and the definition of the new proc command
happen in different contexts, the latter of which is not seen by the
main interpreter process. Any ideas on how to get this working?
--dan
----------------------------------------
dan chak
web: http://www.chak.org
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.