Skip to content
Tcl Source Code History Of Ticket 218956
Login

History Of Ticket 218956

Artifacts Associated With Ticket 218956

  1. Ticket change [7c97b998bb] (rid 97107) by nobody on 2000-10-26 01:08:36:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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
      
    4. foundin initialized to: "final: 8.1.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "http 2.0 package may pollute global namespace"
    11. type initialized to: "Bug"
  2. Ticket change [788b53cc4d] (rid 89976) by welch on 2000-10-26 08:32:15:

    1. closedate changed to: "2000-10-26T01:32:15"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Deleted"
  3. Ticket change [5eade0f22a] (rid 115675) by dgp on 2001-04-23 03:41:35:

    1. subsystem changed to: "29. http Package"
  4. Ticket change [83c47e7b8c] (rid 117435) by dgp on 2001-04-23 03:41:36:

    1. closedate changed to: "2001-04-22T20:41:36"
    2. closer changed to: "dgp"