title: a question about package in TCL
body: <p>I have a question about package in TCL</p>
  
  <p>I have a test1.tcl file:</p>
  
  <pre><code>package provide hello 0.1.0
  
  
  set globalVariable 20
  </code></pre>
  
  <p>this file in required in test2.tcl</p>
  
  <pre><code>package require hello 0.1.0
  
  puts $globalVariable
  </code></pre>
  
  <p>and the pkgIndex.tcl is:</p>
  
  <pre><code>package ifneeded hello 0.1.0 [list source [file join $dir test1.tcl]]
  </code></pre>
  
  <p>when I execute the test2.tcl, it tells me, the package hello 0.1.0 is not found.</p>
  
  <p>I try to execute the pkgIndex.tcl, it tells me can not read variable dir, all of these three files are under the same folder. how could I fix it? can anyone help?</p>