Overview
| Artifact ID: | a2cb16784aefb8b3a94f1d9f9cad7981d95df98b |
|---|---|
| Ticket: | 218318ffffffffffffffffffffffffffffffffff
package ifneeded does not function |
| User & Date: | nobody on 2000-10-26 00:56:06 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 3796 Bug Version: 1.2 SubmitDate: '1999-12-07' LastModified: '1999-12-07' Severity: SER Status: Closed Submitter: techsupp ChangedBy: hobbs OS: Solaris FixedDate: '2000-10-25' ClosedDate: '1999-12-07' Name: Chia-Wei Chow ReproducibleScript: i have 3 packages in /tmp/lib each as a pkgIndex.tcl file in it cat /tmp/lib/a1.0/pkgIndex.tcl package ifneeded A 1.0 [list puts "hello from A!" package provide A 1.0 ] cat /tmp/lib/b1.0/pkgIndex.tcl package ifneeded B 1.0 [list puts "hello from B!" package provide B 1.0 ] cat /tmp/lib/c1.0/pkgIndex.tcl package ifneeded C 1.0 [list puts "hello from C!" package provide C 1.0 ] here's my main tcl script file: lappend auto_path /tmp/lib puts [package require A] when i run "protclsh80 mine.tcl", here's what i got hello from B! hello from C! hello from A! 1.0 ObservedBehavior: i didn't expect to see hello from B! hello from C! DesiredBehavior: i would expect getting hello from A! 1.0 When it runs through finding an unknown package, it will source all the found pkgIndex.tcl files, so it doesn't have to do it again later (unless auto_path changes). Thus, all the files will get evaluated, then it will look to see if 'A' is defined. -- 12/07/1999 hobbs - foundin changed to: "final: 8.0.5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "56. LibTomMath"
- title changed to: "package ifneeded does not function"
- type changed to: "Bug"