package require punk::cap tcl::namespace::eval punk::mix { proc init {} { package require punk::cap::handlers::templates ;#handler for templates cap punk::cap::register_capabilityname punk.templates ::punk::cap::handlers::templates ;#time taken should generally be sub 200us #todo: use tcllib pluginmgr to load all modules that provide 'punk.templates' #review - tcllib pluginmgr 0.5 @2025 has some bugs - esp regarding .tm modules vs packages #We may also need to better control the order of module and library paths in the safe interps pluginmgr uses. #todo - develop punk::pluginmgr to fix these issues (bug reports already submitted re tcllib, but the path issues may need customisation) package require punk::mix::templates ;#registers as provider pkg for 'punk.templates' capability with punk::cap set t [time { if {[catch {punk::mix::templates::provider register *} errM]} { puts stderr "punk::mix failure during punk::mix::templates::provider register *" puts stderr $errM puts stderr "-----" puts stderr $::errorInfo } }] puts stderr "->punk::mix::templates::provider register * t=$t" } init } package require punk::mix::base package require punk::mix::cli package provide punk::mix [tcl::namespace::eval punk::mix { variable version set version 0.2 }]