diff options
author | dgp <dgp@users.sourceforge.net> | 2013-01-30 18:58:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-01-30 18:58:37 (GMT) |
commit | 62d19c65eb9f6745c59fae9ed1117c69335a24ee (patch) | |
tree | 0bf3ad72dc599167e49c1f6917fd1fb260a7749e /library/tm.tcl | |
parent | 91a7a404d263838b97b97250353e43c2e0244026 (diff) | |
download | tcl-62d19c65eb9f6745c59fae9ed1117c69335a24ee.zip tcl-62d19c65eb9f6745c59fae9ed1117c69335a24ee.tar.gz tcl-62d19c65eb9f6745c59fae9ed1117c69335a24ee.tar.bz2 |
For [package] etc., select modernizations from Patrick Fradin.
Diffstat (limited to 'library/tm.tcl')
-rw-r--r-- | library/tm.tcl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/library/tm.tcl b/library/tm.tcl index c5db437..baa268d 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -58,7 +58,7 @@ namespace eval ::tcl::tm { # Export the public API namespace export path - namespace ensemble create -command path -subcommand {add remove list} + namespace ensemble create -command path -subcommands {add remove list} } # ::tcl::tm::path implementations -- @@ -273,10 +273,8 @@ proc ::tcl::tm::UnknownHandler {original name args} { # the regular package search to complete the # processing. - if { - ($pkgname eq $name) && - [package vsatisfies $pkgversion {*}$args] - } then { + if {($pkgname eq $name) + && [package vsatisfies $pkgversion {*}$args]} { set satisfied 1 # We do not abort the loop, and keep adding # provide scripts for every candidate in the @@ -359,7 +357,7 @@ proc ::tcl::tm::Defaults {} { # Calls 'path add' to paths to the list of module search paths. proc ::tcl::tm::roots {paths} { - foreach {major minor} [split [info tclversion] .] break + lassign [split [package present Tcl] .] major minor foreach pa $paths { set p [file join $pa tcl$major] for {set n $minor} {$n >= 0} {incr n -1} { |