From 97bbf253412bd8db3fa496c7eb015e7f2ba2c992 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Thu, 22 Jun 2023 13:35:20 +1000 Subject: [PATCH] temporarily put aside tcl::tm::list paths while loading core punk modules --- src/punk86.vfs/lib/app-shellspy/shellspy.tcl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/punk86.vfs/lib/app-shellspy/shellspy.tcl b/src/punk86.vfs/lib/app-shellspy/shellspy.tcl index 00dd2a4..97a64bf 100644 --- a/src/punk86.vfs/lib/app-shellspy/shellspy.tcl +++ b/src/punk86.vfs/lib/app-shellspy/shellspy.tcl @@ -32,6 +32,8 @@ package provide app-shellspy 1.0 #fconfigure stdout -encoding utf-16le #tcl::tm::remove {*}[tcl::tm::list] +set original_tm_list [tcl::tm::list] +tcl::tm::remove {*}$original_tm_list #add dir outside of tclkit/exe so we can override with higher versions if necessary without rebuilding set m_dir [file normalize [file join [file dirname [info nameofexecutable]] modules]] @@ -71,11 +73,22 @@ if {[file extension $arg1] in [list .tCl]} { #set m_dir [file join $starkit::topdir modules] #lappend auto_path c:/tcl/lib/tcllib1.20 + +#require core modules only from punk distribution (REVIEW - override option?) package require flagfilter package require shellfilter package require Thread package require punk +#restore module paths +set tm_list_now [tcl::tm::list] +foreach p [$original_tm_list] { + if {$p ni $tm_list_now} { + tcl::tm::add $p + } +} + + #package require packageTrace set ::testconfig 5