Overview
| Artifact ID: | 8996693b9865902a2b8b71b514f1a0b9fc42ffaf |
|---|---|
| Ticket: | 86ceb4e2b63cfcee65abade0ed16c9ce846b4e30
package require searching module path in wrong order |
| User & Date: | anonymous on 2013-07-15 05:47:53 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/html"
- comment changed to:
The <a href="https://www.tcl.tk/man/tcl8.6/TclCmd/tm.htm#M5">tm documentation</a> says that a module should be loaded from the module path by looking from the first in the list to the last. However I find that the opposite is happening. The problem can be demonstrated as so:<br /> <br /> If I do:<br /> <pre> <code>::tcl::tm::path list</code></pre> <br /> I get:<br /> <pre> <code>/usr/lib/tcltk/tcl8/site-tcl /usr/lib/tcltk/tcl8/8.0 /usr/lib/tcltk/tcl8/8.1 /usr/lib/tcltk/tcl8/8.2 /usr/lib/tcltk/tcl8/8.3 /usr/lib/tcltk/tcl8/8.4 /usr/lib/tcltk/tcl8/8.5 /usr/lib/tcltk/tcl8/8.6 /usr/lib/tcl8/site-tcl /usr/lib/tcl8/8.0 /usr/lib/tcl8/8.1 /usr/lib/tcl8/8.2 /usr/lib/tcl8/8.3 /usr/lib/tcl8/8.4 /usr/lib/tcl8/8.5 /usr/lib/tcl8/8.6 /usr/share/tcltk/tcl8/site-tcl /usr/share/tcltk/tcl8/8.0 /usr/share/tcltk/tcl8/8.1 /usr/share/tcltk/tcl8/8.2 /usr/share/tcltk/tcl8/8.3 /usr/share/tcltk/tcl8/8.4 /usr/share/tcltk/tcl8/8.5 /usr/share/tcltk/tcl8/8.6 /usr/share/tcltk/tcl8.6/tcl8</code></pre> <br /> <br /> If I create a file called: <em>mymodtest-0.1.tm</em> with the following contents:<br /> <pre> <code>proc number {} {return 1}</code></pre> <br /> I copy that file to the last location in the list above:<br /> <pre> <code>/usr/share/tcltk/tcl8.6/tcl8</code></pre> <br /> Then I edit the file, replace the <code>1</code> with a <code>2</code>, and copy the file to the previous location in the list above:<br /> <pre> <code>/usr/share/tcltk/tcl8/8.6</code></pre> <br /> Finally I edit the file again, replace the <code>2</code> with a <code>3</code>, and copy the file to the previous location in the list above:<br /> <pre> <code>/usr/share/tcltk/tcl8/8.5</code></pre> <br /> When I run the following script:<br /> <pre> <code>package require mymodtest number</code></pre> <br /> I get a <code>1</code>; if I delete the file from the last location in the list, I get a <code>2</code>; if I then delete the file from the previous location I get a <code>3</code>. - foundin changed to: "8.6"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "4066e024a5415dc3e2c65c2860b9e3a9ee7c14b7"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "39. Package Manager"
- title changed to:
package require searching module path in wrong order
- type changed to: "Bug"