Artifacts Associated With Ticket 218956
Ticket change [7c97b998bb] (rid 97107) by nobody on 2000-10-26 01:08:36:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 3174 Bug Version: 8.1.1 SubmitDate: '1999-10-25' LastModified: '1999-10-29' Severity: MED Status: Released Submitter: techsupp ChangedBy: hobbs OS: Other OSVersion: FreeBSD 3.3-RELEASE Machine: NA FixedDate: '1999-10-29' FixedInVersion: 8.2.1 ClosedDate: '2000-10-25' Name: John LoVerso Extensions: none CustomShell: none Comments: This is a trivial and obvious fix to (at least) LIB/http2.0/http.tcl ReproducibleScript: A well written package should not pollute the global namespace unless such global names are documented. Packages should not offer varing behavior given unrelated global names. Consider this example: #!/usr/local/bin/tclsh8.1 package require http http::config puts $alphanumeric This results in the error: can't read "alphanumeric": no such variable while executing "puts $alphanumeric" (file "./x" line 5) Now consider this program, being that a program may have defined a particule global variable. This is noting the general rule that "In Tcl 8.x, the global namespace is the exclusive property of the application." (Rule 3 at http://www.cogent.net/~duquette/tcl/namespaces.html): #!/usr/local/bin/tclsh8.1 set alphanumeric 0-9a-z package require http http::config puts $alphanumeric The result of running this program is startling: a-zA-Z0-9 ObservedBehavior: Using ::http::config will overwrite the existing values of the global variables: alphanumeric, i, c DesiredBehavior: Packages (especially those distributed with Tcl) should be written to not pollute the global namespace. They need to take care to use "variable" in each namespace eval section and must not use global variables as scratch registers. Already fixed in 8.2.1, please upgrade. -- 10/29/1999 hobbs - foundin initialized to: "final: 8.1.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "http 2.0 package may pollute global namespace"
- type initialized to: "Bug"
Ticket change [788b53cc4d] (rid 89976) by welch on 2000-10-26 08:32:15:
- closedate changed to: "2000-10-26T01:32:15"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Deleted"
Ticket change [5eade0f22a] (rid 115675) by dgp on 2001-04-23 03:41:35:
- subsystem changed to: "29. http Package"
Ticket change [83c47e7b8c] (rid 117435) by dgp on 2001-04-23 03:41:36:
- closedate changed to: "2001-04-22T20:41:36"
- closer changed to: "dgp"