@@ -3,7 +3,7 @@ namespace eval ::cluster {
33 namespace export {[a-z]*}
44
55 namespace eval cluster {}
6- namespace eval protocol {}
6+ namespace eval protocol {}
77}
88
99variable ::cluster::script_dir [file dirname \
1717 | can still require and use the package with the included
1818 | tcl-modules folder in the repo.
1919}
20- if {![string match $script_dir [::tcl::tm::path list]]} {
21- ::tcl::tm::path add [file join $script_dir tcl-modules]
20+ if {![string match $::cluster:: script_dir [::tcl::tm::path list]]} {
21+ ::tcl::tm::path add [file join $::cluster:: script_dir tcl-modules]
2222}
2323
2424package require bpacket
@@ -113,16 +113,15 @@ if 0 {
113113 | the proc is removed via [rename ]
114114}
115115proc ::cluster::source {} {
116- set script_dir [file dirname [file normalize [info script]]]
117- set classes_directory [file join $script_dir cluster classes]
116+ set classes_directory [file join $::cluster::script_dir cluster classes]
118117 foreach file [glob -directory $classes_directory *.tcl] {
119118 uplevel #0 [list source $file ]
120119 }
121- set protocol_directory [file join $script_dir cluster protocols]
120+ set protocol_directory [file join $::cluster:: script_dir cluster protocols]
122121 foreach file [glob -directory $protocol_directory *.tcl] {
123122 uplevel #0 [list source $file ]
124123 }
125- set utils_directory [file join [file dirname $script_dir cluster utils]
124+ set utils_directory [file join [file dirname $::cluster:: script_dir cluster utils]
126125 foreach file [glob -directory $utils_directory *.tcl] {
127126 if {[string match *general.tcl $file ]} { continue }
128127 uplevel #0 [list source $file ]
0 commit comments