fc2 tcl problem?
Luciano Miguel Ferreira Rocha
strange at nsk.no-ip.org
Mon Jun 28 20:43:55 UTC 2004
Hello,
The following code:
package provide cgi 2.0
namespace eval cgi {
variable Channel stdin ;## channel for reading data
variable Field ;## variables o CGI communication (array)
variable Red 0 ;## Is data red?
variable Cookie ;## cookies array
variable Type ;## Types for eacg CGI variable (array)
variable Mime text/plain ;## MIME type of last request
variable BUFFER_SIZE 500000 ;## maximum bytes in multipart upload
variable env ;## environment for executing cgi
variable TMP /var/tmp ;## directory of temporary files (upload)
variable TIMEOUT 2000 ;## timeout or reading message (POST)
variable STEP 100 ;## time between reading attempts (POST)
namespace export start ;## processes CGI using argument
namespace export state ;## processes cooies using argument
namespace export field ;## returns field value
namespace export cookie ;## returns field value
namespace export url_encode ;## Encode argument in URL
namespace export url_edecode ;## Decode argument in URL
namespace export url_encode_state ;## Encode state of CGI variables
}
...
## Read data from CGI communication
proc cgi::data {} {
variable env
variable Red
if $Red return
upvar #0 ::env cgi::env ;# use process environment
if { [ info exists env(CONTENT_TYPE) ] } {
switch -regexp -- $env(CONTENT_TYPE) {
multipart/form-data { multipart }
application/x-www-form-urlencoded { urlencoded }
default { urlencoded }
}
} else {
urlencoded
}
set Red 1
}
Causes the error:
2004/06/28 19:18:02 ??: can't create "cgi::env": parent namespace doesn't
exist:
when TCL from FC2 (tcl-8.4.5-7) or rawhide (tcl-8.4.6-2) is used, but works
well with the last update to FC1 (tcl-8.3.5-96.0.1).
Can anyone that knows more than I about tcl if this is a bug in tcl
itself, and that I should report it to bugzilla, or if it's a bug in the
application, and give some pointers on how to correct it?
Thanks,
Luciano Rocha
More information about the fedora-list
mailing list