summaryrefslogtreecommitdiffstats
path: root/doc/tm.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-01-23 16:42:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-01-23 16:42:15 (GMT)
commitc93ca3534a26772f8acc81f3432c1bc74da5c701 (patch)
tree5fa5c50aa0b980fc25477f158eea2a756922fadd /doc/tm.n
parent8399b253ca7479b09d5d05ce4e81a9c9697a3582 (diff)
downloadtcl-c93ca3534a26772f8acc81f3432c1bc74da5c701.zip
tcl-c93ca3534a26772f8acc81f3432c1bc74da5c701.tar.gz
tcl-c93ca3534a26772f8acc81f3432c1bc74da5c701.tar.bz2
merge updates from HEAD
Diffstat (limited to 'doc/tm.n')
-rw-r--r--doc/tm.n22
1 files changed, 18 insertions, 4 deletions
diff --git a/doc/tm.n b/doc/tm.n
index e80f7b1..82968f2 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.6.2.1 2007/11/01 16:25:56 dgp Exp $
+'\" RCS: @(#) $Id: tm.n,v 1.6.2.2 2008/01/23 16:42:17 dgp Exp $
'\"
.so man.macros
.TH tm n 8.5 Tcl "Tcl Built-In Commands"
@@ -25,6 +25,7 @@ This document describes the facilities for locating and loading Tcl
Modules. The following commands are supported:
.TP
\fB::tcl::tm::path\fR \fBadd\fR \fIpath\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.
@@ -46,14 +47,17 @@ looked at first.
.RE
.TP
\fB::tcl::tm::path\fR \fBremove\fR \fIpath\fR...
+.
Removes the paths from the list of module paths. The command silently
ignores all paths which are not on the list.
.TP
\fB::tcl::tm::path\fR \fBlist\fR
+.
Returns a list containing all registered module paths, in the order
that they are searched for modules.
.TP
\fB::tcl::tm::roots\fR \fIpath\fR...
+.
Similar to \fBpath add\fR, and layered on top of it. This command
takes a list of paths, extends each with
.QW "\fBtcl\fIX\fB/site-tcl\fR" ,
@@ -109,9 +113,11 @@ of the command \fB::tcl::tm::path list\fR.
This is called the \fIModule path\fR. Neither the \fBauto_path\fR nor
the \fBtcl_pkgPath\fR variables are used.
All directories on the module path have to obey one restriction:
-.IP
+.RS
+.PP
For any two directories, neither is an ancestor directory of the
other.
+.RE
.PP
This is required to avoid ambiguities in package naming. If for
example the two directories
@@ -125,19 +131,23 @@ obscuring a package named \fBice\fR, unqualified.
.PP
Before the search is started, the name of the requested package is
translated into a partial path, using the following algorithm:
-.IP
+.RS
+.PP
All occurrences of
.QW "\fB::\fR"
in the package name are replaced by
the appropriate directory separator character for the platform we are
on. On Unix, for example, this is
.QW "\fB/\fR" .
+.RE
.PP
Example:
-.IP
+.RS
+.PP
The requested package is \fBencoding::base64\fR. The generated
partial path is
.QW "\fIencoding/base64\fR" .
+.RE
.PP
After this translation the package is looked for in all module paths,
by combining them one-by-one, first to last with the partial path to
@@ -207,6 +217,7 @@ are found in the variable.
.SS "SYSTEM SPECIFIC PATHS"
.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
to the minor version of the interpreter.
@@ -227,6 +238,7 @@ can also be used by all interpreters which have the same major number
.RE
.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
.RS
@@ -239,11 +251,13 @@ identical.
.SS "SITE SPECIFIC PATHS"
.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"
.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
can be set not only by the user's profile, but by system configuration