# -*- tcl -*- # Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from -buildversion.txt # # Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. # Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. # ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ # (C) 2023 # # @@ Meta Begin # Application %pkg% 999999.0a1.0 # Meta platform tcl # Meta license # @@ Meta End # ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ apply {code { #auto determine package name and version from name and placement of .tm file foreach base [tcl::tm::list] { set nsprefix "";#in case sourced directly and not in any of the .tm paths if {[string match -nocase ${base}* [info script]]} { set nsprefix [string trimleft [join [lrange [file split [string range [info script] [string length $base]+1 end]] 0 end-1] ::]:: ::] break } } set ver [join [lassign [split [file rootname [file tail [info script] ]] -] pkgtail] -] set pkgns ${nsprefix}${pkgtail} namespace eval $pkgns [string map [list $pkgns $ver] $code] package provide $pkgns $ver;# only provide package if code evaluated without error } ::} { namespace export {[a-z]*} ;# Convention: export all lowercase #-------------------------------------- variable pkg "" variable version "" #-------------------------------------- # ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ ## Requirements ##e.g package require frobz #proc test {args} {puts "[namespace current]::test got args: $args"} namespace eval [namespace current]::lib { namespace export {[a-z]*} ;# Convention: export all lowercase #proc test {args} {puts "[namespace current]::test got args: $args"} } # ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ ## Ready } return