Skip to content
Tcl Source Code Artifact [8996693b98]
Login

Artifact [8996693b98]

Artifact 8996693b9865902a2b8b71b514f1a0b9fc42ffaf:

Ticket change [8996693b98] - New ticket [86ceb4e2b63cfcee|86ceb4e2b6] <i>package require searching module path in wrong order</i>. by anonymous on 2013-07-15 05:47:53.
D 2013-07-15T05:47:53.688
J assignee nobody
J closer nobody
J cmimetype text/html
J comment The\s<a\shref="https://www.tcl.tk/man/tcl8.6/TclCmd/tm.htm#M5">tm\sdocumentation</a>\ssays\sthat\sa\smodule\sshould\sbe\sloaded\sfrom\sthe\smodule\spath\sby\slooking\sfrom\sthe\sfirst\sin\sthe\slist\sto\sthe\slast.\s\sHowever\sI\sfind\sthat\sthe\sopposite\sis\shappening.\s\sThe\sproblem\scan\sbe\sdemonstrated\sas\sso:<br\s/>\r\n<br\s/>\r\nIf\sI\sdo:<br\s/>\r\n<pre>\s\s<code>::tcl::tm::path\slist</code></pre>\r\n<br\s/>\r\nI\sget:<br\s/>\s\r\n<pre>\s\s<code>/usr/lib/tcltk/tcl8/site-tcl\s/usr/lib/tcltk/tcl8/8.0\r\n\s\s/usr/lib/tcltk/tcl8/8.1\s/usr/lib/tcltk/tcl8/8.2\r\n\s\s/usr/lib/tcltk/tcl8/8.3\s/usr/lib/tcltk/tcl8/8.4\r\n\s\s/usr/lib/tcltk/tcl8/8.5\s/usr/lib/tcltk/tcl8/8.6\r\n\s\s/usr/lib/tcl8/site-tcl\s/usr/lib/tcl8/8.0\r\n\s\s/usr/lib/tcl8/8.1\s/usr/lib/tcl8/8.2\r\n\s\s/usr/lib/tcl8/8.3\s/usr/lib/tcl8/8.4\r\n\s\s/usr/lib/tcl8/8.5\s/usr/lib/tcl8/8.6\r\n\s\s/usr/share/tcltk/tcl8/site-tcl\s/usr/share/tcltk/tcl8/8.0\r\n\s\s/usr/share/tcltk/tcl8/8.1\s/usr/share/tcltk/tcl8/8.2\r\n\s\s/usr/share/tcltk/tcl8/8.3\s/usr/share/tcltk/tcl8/8.4\r\n\s\s/usr/share/tcltk/tcl8/8.5\s/usr/share/tcltk/tcl8/8.6\r\n\s\s/usr/share/tcltk/tcl8.6/tcl8</code></pre>\r\n<br\s/>\r\n<br\s/>\r\nIf\sI\screate\sa\sfile\scalled:\s<em>mymodtest-0.1.tm</em>\swith\sthe\sfollowing\scontents:<br\s/>\r\n<pre>\s\s<code>proc\snumber\s{}\s{return\s1}</code></pre>\r\n<br\s/>\r\nI\scopy\sthat\sfile\sto\sthe\slast\slocation\sin\sthe\slist\sabove:<br\s/>\r\n<pre>\s\s<code>/usr/share/tcltk/tcl8.6/tcl8</code></pre>\r\n<br\s/>\r\nThen\sI\sedit\sthe\sfile,\sreplace\sthe\s<code>1</code>\swith\sa\s<code>2</code>,\sand\scopy\sthe\sfile\sto\sthe\sprevious\slocation\sin\sthe\slist\sabove:<br\s/>\r\n<pre>\s\s<code>/usr/share/tcltk/tcl8/8.6</code></pre>\r\n<br\s/>\r\nFinally\sI\sedit\sthe\sfile\sagain,\sreplace\sthe\s<code>2</code>\swith\sa\s<code>3</code>,\sand\scopy\sthe\sfile\sto\sthe\sprevious\slocation\sin\sthe\slist\sabove:<br\s/>\r\n<pre>\s\s<code>/usr/share/tcltk/tcl8/8.5</code></pre>\r\n<br\s/>\r\nWhen\sI\srun\sthe\sfollowing\sscript:<br\s/>\r\n<pre>\s\s<code>package\srequire\smymodtest\s\r\n\s\snumber</code></pre>\r\n<br\s/>\r\nI\sget\sa\s<code>1</code>;\sif\sI\sdelete\sthe\sfile\sfrom\sthe\slast\slocation\sin\sthe\slist,\sI\sget\sa\s<code>2</code>;\s\sif\sI\sthen\sdelete\sthe\sfile\sfrom\sthe\sprevious\slocation\sI\sget\sa\s<code>3</code>.
J foundin 8.6
J is_private 0
J login anonymous
J priority 5\sMedium
J private_contact 4066e024a5415dc3e2c65c2860b9e3a9ee7c14b7
J resolution None
J severity Minor
J status Open
J submitter anonymous
J subsystem 39.\sPackage\sManager
J title package\srequire\ssearching\smodule\spath\sin\swrong\sorder
J type Bug
K 86ceb4e2b63cfcee65abade0ed16c9ce846b4e30
U anonymous
Z b6c067659838a06ee3a0e5bb7d3b7f2a