summaryrefslogtreecommitdiffstats
path: root/library/tm.tcl
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2008-08-11 21:03:40 (GMT)
committerandreas_kupries <akupries@shaw.ca>2008-08-11 21:03:40 (GMT)
commitab3517ae4d6cb7db7cd132fb1c502b9a82794859 (patch)
tree2a17dce4d0dc38fcd2bfe897c3571a7a5663bffc /library/tm.tcl
parent49f30082dd3c2a494c7a7bca131dbd509953c961 (diff)
downloadtcl-ab3517ae4d6cb7db7cd132fb1c502b9a82794859.zip
tcl-ab3517ae4d6cb7db7cd132fb1c502b9a82794859.tar.gz
tcl-ab3517ae4d6cb7db7cd132fb1c502b9a82794859.tar.bz2
* library/tm.tcl: Added a 'package provide' command to the
generated ifneeded scripts of Tcl Modules, for early detection of conflicts between the version specified through the file name and a 'provide' command in the module implementation, if any. Note that this change also now allows Tcl Modules to not provide a 'provide' command at all, and declaring their version only through their filename.
Diffstat (limited to 'library/tm.tcl')
-rw-r--r--library/tm.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/tm.tcl b/library/tm.tcl
index 4f58d12..24ddb86 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -254,7 +254,8 @@ proc ::tcl::tm::UnknownHandler {original name args} {
# means something else without the namespace
# specifier.
- package ifneeded $pkgname $pkgversion [::list source -encoding utf-8 $file]
+ package ifneeded $pkgname $pkgversion \
+ "[::list package provide $pkgname $pkgversion];[::list source -encoding utf-8 $file]"
# We abort in this unknown handler only if we got
# a satisfying candidate for the requested