summaryrefslogtreecommitdiffstats
path: root/library/tm.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-01-30 19:00:27 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-01-30 19:00:27 (GMT)
commitddaf86432d2523d3242c670af64654571f36a0d5 (patch)
tree43a466d8834829d1bb81dc12d20bdc9a442fb6d9 /library/tm.tcl
parentf26510438d420ec20e8840063ca9c3cc8989663e (diff)
parent3ac002a666fce71f19f025288d9e18c0819bb91a (diff)
downloadtcl-ddaf86432d2523d3242c670af64654571f36a0d5.zip
tcl-ddaf86432d2523d3242c670af64654571f36a0d5.tar.gz
tcl-ddaf86432d2523d3242c670af64654571f36a0d5.tar.bz2
For [package] etc., select modernizations from Patrick Fradin.
Diffstat (limited to 'library/tm.tcl')
-rw-r--r--library/tm.tcl10
1 files changed, 4 insertions, 6 deletions
diff --git a/library/tm.tcl b/library/tm.tcl
index ce8a013..d2af4f5 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -54,7 +54,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 --
@@ -260,10 +260,8 @@ proc ::tcl::tm::UnknownHandler {original name args} {
# Otherwise we still have to fallback to 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
@@ -347,7 +345,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} {