Skip to content
Tcl Source Code Artifact [7c97b998bb]
Login

Artifact [7c97b998bb]

Artifact 7c97b998bbf5011300266dcf1d0fa095d9d2feb4:

Ticket change [7c97b998bb] - New ticket [218956ffffffffff|218956ffff] <i>http 2.0 package may pollute global namespace</i>. by nobody on 2000-10-26 01:08:36.
D 2000-10-26T01:08:36
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3174\sBug\nVersion:\s8.1.1\nSubmitDate:\s'1999-10-25'\nLastModified:\s'1999-10-29'\nSeverity:\sMED\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sOther\nOSVersion:\sFreeBSD\s3.3-RELEASE\nMachine:\sNA\nFixedDate:\s'1999-10-29'\nFixedInVersion:\s8.2.1\nClosedDate:\s'2000-10-25'\n\n\nName:\nJohn\sLoVerso\n\nExtensions:\nnone\n\nCustomShell:\nnone\n\nComments:\nThis\sis\sa\strivial\sand\sobvious\sfix\sto\s(at\sleast)\sLIB/http2.0/http.tcl\n\nReproducibleScript:\nA\swell\swritten\spackage\sshould\snot\spollute\sthe\sglobal\snamespace\sunless\n\s\s\s\ssuch\sglobal\snames\sare\sdocumented.\n\s\s\s\s\n\s\s\s\sPackages\sshould\snot\soffer\svaring\sbehavior\sgiven\sunrelated\sglobal\snames.\n\s\s\s\s\n\s\s\s\sConsider\sthis\sexample:\n\s\s\s\s\n\s\s\s\s#!/usr/local/bin/tclsh8.1\n\s\s\s\spackage\srequire\shttp\n\s\s\s\shttp::config\n\s\s\s\sputs\s$alphanumeric\n\s\s\s\s\n\s\s\s\sThis\sresults\sin\sthe\serror:\n\s\s\s\s\n\s\s\s\scan't\sread\s"alphanumeric":\sno\ssuch\svariable\n\s\s\s\s\s\s\s\swhile\sexecuting\n\s\s\s\s"puts\s$alphanumeric"\n\s\s\s\s\s\s\s\s(file\s"./x"\sline\s5)\n\s\s\s\s\n\s\s\s\sNow\sconsider\sthis\sprogram,\sbeing\sthat\sa\sprogram\smay\shave\sdefined\sa\n\s\s\s\sparticule\sglobal\svariable.\s\sThis\sis\snoting\sthe\sgeneral\srule\sthat\s"In\sTcl\n\s\s\s\s8.x,\sthe\sglobal\snamespace\sis\sthe\sexclusive\sproperty\sof\sthe\sapplication."\n\s\s\s\s(Rule\s3\sat\shttp://www.cogent.net/~duquette/tcl/namespaces.html):\n\s\s\s\s\n\s\s\s\s#!/usr/local/bin/tclsh8.1\n\s\s\s\sset\salphanumeric\s0-9a-z\n\s\s\s\spackage\srequire\shttp\n\s\s\s\shttp::config\n\s\s\s\sputs\s$alphanumeric\n\s\s\s\s\n\s\s\s\sThe\sresult\sof\srunning\sthis\sprogram\sis\sstartling:\n\s\s\s\s\n\s\s\s\sa-zA-Z0-9\n\nObservedBehavior:\nUsing\s::http::config\swill\soverwrite\sthe\sexisting\svalues\sof\sthe\sglobal\n\s\s\s\svariables:\n\s\s\s\s\n\s\s\s\s\s\s\s\salphanumeric,\si,\sc\n\nDesiredBehavior:\nPackages\s(especially\sthose\sdistributed\swith\sTcl)\sshould\sbe\swritten\sto\n\s\s\s\snot\spollute\sthe\sglobal\snamespace.\s\sThey\sneed\sto\stake\scare\sto\suse\n\s\s\s\s"variable"\sin\seach\snamespace\seval\ssection\sand\smust\snot\suse\sglobal\n\s\s\s\svariables\sas\sscratch\sregisters.\n\n\n\nAlready\sfixed\sin\s8.2.1,\splease\supgrade.\s\n--\s10/29/1999\shobbs
J foundin final:\s8.1.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title http\s2.0\spackage\smay\spollute\sglobal\snamespace
J type Bug
K 218956ffffffffffffffffffffffffffffffffff
U nobody
Z d9380c2699e7fcf9802f664eb6f481f9