Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tcl modules vs. package names vs. namespace names

45 views
Skip to first unread message

stefan

unread,
Jan 9, 2018, 5:40:49 AM1/9/18
to
Hi everybody,

I typically align package (module) and namespace names:

mypkg-0.1.tm
namespace eval ::mypkg

For package names, it is not uncommon to use ':' or '::', e.g.: tcl::tommath

How would such a package name map to a TM file name, given that ':' is still somewhat treated alien by some file systems (or, at least, the tools operating on the file systems)?

myproj::mypkg-0.1.tm
package req myproj::mypkg
namespace eval ::myproj::mypkg {}

If I understand correctly, there is no special delimiter for TM names that maps to '::', internally? (e.g., '.' -> '::')

myproj.mypkg-0.1.tm
package req myproj::mypkg
namespace eval ::myproj::mypkg {}

Any suggestions or comments?

Thx for sharing your thoughts.

Stefan







Rich

unread,
Jan 9, 2018, 6:20:54 AM1/9/18
to
The answer is in the man page:

All occurrences of "::" in the package name are replaced
by the appropriate directory separator character for the
platform we are on. On Unix, for example, this is "/".

stefan

unread,
Jan 9, 2018, 6:58:00 AM1/9/18
to
Stupid me, not reading properly tm.n

Thx for pointing me towards it again.
Stefan
0 new messages