In TCL 8.0, tclIndex files created by auto_mkindex<br>
contained procedure names which were NOT qualified with<br>
their namespace prefixes. Therefore, if these were public,<br>
exported commands then the autoloader worked just fine.<br>
<br>
In TCL 8.1 and 8.2, the tclIndex files contain fully<br>
qualified names and the autoloader does not work. The<br>
following example requires two files:<br>
<br>
File s1.tcl:<br>
<br>
namespace eval n1 {<br>
<br>
namespace export pub1<br>
proc pub1 {} { puts "Executing \"pub1\"" }<br>
<br>
}<br>
<br>
namespace import n1:ub1<br>
<br>
File s2.tcl:<br>
<br>
auto_mkindex . *.tcl<br>
set auto_path .<br>
pub1<br>
<br>
Executing with "tclsh < s2.tcl" successfully executes pub1<br>
in 8.0 but not in 8.1 or 8.2. The 8.0 (working) tclIndex<br>
file is:<br>
<br>
set auto_index(pub1) [list source [file join $dir s1.tcl]]<br>
<br>
and the 8.1 and 8.2 (non-working) one is:<br>
<br>
set auto_index:n1:ub1) [list source [file join $dir s1.tcl]]<br>
<br>
My systems are currently running only because each line<br>
of all the tclIndex files are munged with:<br>
<br>
regsub {::.*::} $l {} l<br>
<br>
but is there a more elegant solution?<br>
contained procedure names which were NOT qualified with<br>
their namespace prefixes. Therefore, if these were public,<br>
exported commands then the autoloader worked just fine.<br>
<br>
In TCL 8.1 and 8.2, the tclIndex files contain fully<br>
qualified names and the autoloader does not work. The<br>
following example requires two files:<br>
<br>
File s1.tcl:<br>
<br>
namespace eval n1 {<br>
<br>
namespace export pub1<br>
proc pub1 {} { puts "Executing \"pub1\"" }<br>
<br>
}<br>
<br>
namespace import n1:ub1<br>
<br>
File s2.tcl:<br>
<br>
auto_mkindex . *.tcl<br>
set auto_path .<br>
pub1<br>
<br>
Executing with "tclsh < s2.tcl" successfully executes pub1<br>
in 8.0 but not in 8.1 or 8.2. The 8.0 (working) tclIndex<br>
file is:<br>
<br>
set auto_index(pub1) [list source [file join $dir s1.tcl]]<br>
<br>
and the 8.1 and 8.2 (non-working) one is:<br>
<br>
set auto_index:n1:ub1) [list source [file join $dir s1.tcl]]<br>
<br>
My systems are currently running only because each line<br>
of all the tclIndex files are munged with:<br>
<br>
regsub {::.*::} $l {} l<br>
<br>
but is there a more elegant solution?<br>