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 | 3ac002a666fce71f19f025288d9e18c0819bb91a (patch) | |
tree | 0bf3ad72dc599167e49c1f6917fd1fb260a7749e /library/tm.tcl | |
parent | 3475ea5378a063cc71bc3c0e35ae338c31d0426f (diff) | |
download | tcl-3ac002a666fce71f19f025288d9e18c0819bb91a.zip tcl-3ac002a666fce71f19f025288d9e18c0819bb91a.tar.gz tcl-3ac002a666fce71f19f025288d9e18c0819bb91a.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} { |