summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/tm.n28
1 files changed, 18 insertions, 10 deletions
diff --git a/doc/tm.n b/doc/tm.n
index e9455a3..0b76ad7 100644
--- a/doc/tm.n
+++ b/doc/tm.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: tm.n,v 1.2 2004/10/22 22:08:25 dkf Exp $
+'\" RCS: @(#) $Id: tm.n,v 1.3 2004/10/22 22:27:18 dkf Exp $
'\"
.so man.macros
.TH tm n 8.5 Tcl "Tcl Built-In Commands"
@@ -24,12 +24,12 @@ tm \- Facilities for locating and loading of Tcl Modules
.SH DESCRIPTION
This document describes the facilities for locating and loading Tcl
Modules. The following commands are supported:
-.SH API
.TP
\fB::tcl::tm::path\fR \fBadd\fR \fIpath\fR...\fR
The paths are added at the head to the list of module paths, in order
of appearance. This means that the last argument ends up as the new
head of the list.
+.RS
.PP
The command enforces the restriction that no path may be an ancestor
directory of any other path on the list. If any of the new paths
@@ -44,6 +44,7 @@ Paths are searched later in the order of their appearance in the
list. As they are added to the front of the list they are searched in
reverse order of addition. In other words, the paths added last are
looked at first.
+.RE
.TP
\fB::tcl::tm::path\fR \fBremove\fR \fIpath\fR...\fR
Removes the paths from the list of module paths. The command silently
@@ -60,12 +61,14 @@ and "\fBtcl\fIX\fB/\fIX\fB.\fIy\fR", for major version \fIX\fR of the
Tcl interpreter and minor version \fIy\fR less than or equal to the
minor version of the interpreter, and adds the resulting set of paths
to the list of paths to search.
+.RS
.PP
This command is used internally by the system to set up the
system-specific default paths.
.PP
The command has been exposed to allow a buildsystem to define
-additional root paths beyond those defined by the TIP..
+additional root paths beyond those described by this document.
+.RE
.SH "MODULE DEFINITION"
A Tcl Module is a Tcl Package contained in a single file, and no other
files required by it. This file has to be \fBsource\fRable. In other
@@ -80,8 +83,7 @@ Ever since 8.4 the Tcl \fBsource\fR command reads only until the first
^Z character. This allows us to combine an arbitrary Tcl script with
arbitrary binary data into one file, where the script processes the
attached data in any it chooses to fully import and activate the
-package. Please read TIP #190 "Implementation Choices for Tcl Modules"
-for more explanations of the various choices which are possible.
+package.
.PP
The name of a module file has to match the regular expression:
.CS
@@ -194,7 +196,7 @@ The paths are added in the order as they are listed below, and for
lists of paths defined by an environment variable in the order they
are found in the variable.
.SS "SYSTEM SPECIFIC PATHS"
-.IP
+.TP
\fBfile normalize [info library]/../tcl\fIX\fB/\fIX\fB.\fIy\fR
In other words, the interpreter will look into a directory specified
by its major version and whose minor versions are less than or equal
@@ -214,7 +216,7 @@ This definition assumes that a package defined for Tcl \fIX\fB.\fIy\fR
can also be used by all interpreters which have the same major number
\fIX\fR and a minor number greater than \fIy\fR.
.RE
-.IP
+.TP
\fBfile normalize EXEC/tcl\fIX\fB/\fIX\fB.\fIy\fR
Where \fBEXEC\fR is \fBfile normalize [info nameofexecutable]/../lib\fR
or \fBfile normalize [::tcl::pkgconfig get libdir,runtime]\fR
@@ -226,10 +228,12 @@ For a build with \fBPREFIX\fR = \fBEXEC_PREFIX\fR the two sets are
identical.
.RE
.SS "SITE SPECIFIC PATHS"
-.IP
+.TP
\fBfile normalize [info library]/../tcl\fIX\fB/site-tcl\fR
+Note that this is always a single entry because \fIX\fR is always a
+specific value (the current major version of Tcl).
.SS "USER SPECIFIC PATHS"
-.IP
+.TP
\fB$::env(TCL\fIX\fB.\fIy\fB_TM_PATH)\fR
A list of paths, separated by either \fB:\fR (Unix) or \fB;\fR
(Windows). This is user and site specific as this environment variable
@@ -253,7 +257,11 @@ environment variables:
.RE
.SH "SEE ALSO"
-package(n), Tcl Improvement Proposal #189
+package(n), Tcl Improvement Proposal #189 "\fITcl Modules\fR" (online
+at http://tip.tcl.tk/189.html), Tcl Improvement Proposal #190
+"\fIImplementation Choices for Tcl Modules\fR" (online at
+http://tip.tcl.tk/190.html)
+
.SH "KEYWORDS"
modules, package