summaryrefslogtreecommitdiffstats
path: root/doc/package.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-26 20:11:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-26 20:11:50 (GMT)
commit6b9dd216db20bac6c76552a6193d67a01e1d34ee (patch)
treeb86166558de62f70eef1a7524fac75f7b47a4f44 /doc/package.n
parent236c395276f8f1cf4d5b745ea490b4966e6eb148 (diff)
downloadtcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.zip
tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.gz
tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.bz2
* changes: Updated for 8.5b2 release.core_8_5_b2
* doc/*.1: Revert doc changes that broke * doc/*.3: `make html` so we can get the release * doc/*.n: out the door.
Diffstat (limited to 'doc/package.n')
-rw-r--r--doc/package.n114
1 files changed, 34 insertions, 80 deletions
diff --git a/doc/package.n b/doc/package.n
index f304af2..ce5c955 100644
--- a/doc/package.n
+++ b/doc/package.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: package.n,v 1.19 2007/10/25 10:13:35 dkf Exp $
+'\" RCS: @(#) $Id: package.n,v 1.20 2007/10/26 20:11:53 dgp Exp $
'\"
.so man.macros
.TH package n 7.5 Tcl "Tcl Built-In Commands"
@@ -29,6 +29,7 @@ package \- Facilities for package loading and version control
\fBpackage prefer \fR?\fBlatest\fR|\fBstable\fR?
.fi
.BE
+
.SH DESCRIPTION
.PP
This command keeps a simple database of the packages available for
@@ -109,13 +110,10 @@ vsatisfies\fR. If multiple versions are suitable the implementation
with the highest version is chosen. This last part is additionally
influenced by the selection mode set with \fBpackage prefer\fR.
.PP
-In the
-.QW "stable"
-selection mode the command will select the highest
+In the "stable" selection mode the command will select the highest
stable version satisfying the requirements, if any. If no stable
version satisfies the requirements, the highest unstable version
-satisfying the requirements will be selected. In the
-.QW "latest"
+satisfying the requirements will be selected. In the "latest"
selection mode the command will accept the highest version satisfying
all the requirements, regardless of its stableness.
.PP
@@ -145,10 +143,7 @@ of \fIpackage\fR is acceptable to the caller. This command is
equivalent to \fBpackage require \fIpackage version\fR-\fIversion\fR.
.TP
\fBpackage unknown \fR?\fIcommand\fR?
-.
-This command supplies a
-.QW "last resort"
-command to invoke during
+This command supplies a ``last resort'' command to invoke during
\fBpackage require\fR if no suitable version of a package can be found
in the \fBpackage ifneeded\fR database.
If the \fIcommand\fR argument is supplied, it contains the first part
@@ -183,24 +178,17 @@ have any of the forms:
.RS
.TP
min
-This form is called
-.QW "min-bounded" .
+This form is called "min-bounded".
.TP
min-
-This form is called
-.QW "min-unbound" .
+This form is called "min-unbound".
.TP
min-max
-This form is called
-.QW "bounded" .
+This form is called "bounded".
.RE
.RS
.PP
-where
-.QW "min"
-and
-.QW "max"
-are valid version numbers. The legacy syntax is
+where "min" and "max" are valid version numbers. The legacy syntax is
a special case of the extended syntax, keeping backward
compatibility. Regarding satisfaction the rules are:
.RE
@@ -209,9 +197,7 @@ compatibility. Regarding satisfaction the rules are:
The \fIversion\fR has to pass at least one of the listed
\fIrequirement\fRs to be satisfactory.
.IP [2]
-A version satisfies a
-.QW "bounded"
-requirement when
+A version satisfies a "bounded" requirement when
.RS
.IP [a]
For \fImin\fR equal to the \fImax\fR if, and only if the \fIversion\fR
@@ -219,63 +205,42 @@ is equal to the \fImin\fR.
.IP [b]
Otherwise if, and only if the \fIversion\fR is greater than or equal
to the \fImin\fR, and less than the \fImax\fR, where both \fImin\fR
-and \fImax\fR have been padded internally with
-.QW a0 .
-Note that while the comparison to \fImin\fR is inclusive, the comparison to
+and \fImax\fR have been padded internally with 'a0'. Note that while
+the comparison to \fImin\fR is inclusive, the comparison to
\fImax\fR is exclusive.
.RE
.IP [3]
-A
-.QW "min-bounded"
-requirement is a
-.QW "bounded"
-requirement in disguise,
+A "min-bounded" requirement is a "bounded" requirement in disguise,
with the \fImax\fR part implicitly specified as the next higher major
version number of the \fImin\fR part. A version satisfies it per the
rules above.
.IP [4]
-A \fIversion\fR satisfies a
-.QW "min-unbound"
-requirement if, and only if
+A \fIversion\fR satisfies a "min-unbound" requirement if, and only if
it is greater than or equal to the \fImin\fR, where the \fImin\fR has
-been padded internally with
-.QW a0 .
-There is no constraint to a maximum.
+been padded internally with 'a0'. There is no constraint to a maximum.
.RE
.TP
\fBpackage prefer \fR?\fBlatest\fR|\fBstable\fR?
-With no arguments, the commands returns either
-.QW "latest"
-or
-.QW "stable" ,
+With no arguments, the commands returns either "latest" or "stable",
whichever describes the current mode of selection logic used by
\fBpackage require\fR.
.RS
.PP
-When passed the argument
-.QW "latest" ,
-it sets the selection logic mode to
-.QW "latest" .
+When passed the argument "latest", it sets the selection logic mode to
+"latest".
.PP
-When passed the argument
-.QW "stable" ,
-if the mode is already
-.QW "stable" ,
-that value is kept. If the mode is already
-.QW "latest" , then the attempt to set it back to
-.QW "stable"
-is ineffective and the mode value remains
-.QW "latest" .
+When passed the argument "stable", if the mode is already "stable",
+that value is kept. If the mode is already "latest", then the attempt
+to set it back to "stable" is ineffective and the mode value remains
+"latest".
.PP
When passed any other value as an argument, raise an invalid argument
error.
.PP
When an interpreter is created, its initial selection mode value is set to
-.QW "stable"
-unless the environment variable \fBTCL_PKG_PREFER_LATEST\fR
+"stable" unless the environment variable \fBTCL_PKG_PREFER_LATEST\fR
is set. If that environment variable is defined (with any value) then
-the initial (and permanent) selection mode value is set to
-.QW "latest" .
+the initial (and permanent) selection mode value is set to "latest".
.RE
.SH "VERSION NUMBERS"
.PP
@@ -288,29 +253,16 @@ For example, version 2.1 is later than 1.3 and version
3.4.6 is later than 3.3.5.
Missing fields are equivalent to zeroes: version 1.3 is the
same as version 1.3.0 and 1.3.0.0, so it is earlier than 1.3.1 or 1.3.0.2.
-In addition, the letters
-.QW a
-(alpha) and/or
-.QW b
-(beta) may appear
+In addition, the letters 'a' (alpha) and/or 'b' (beta) may appear
exactly once to replace a dot for separation. These letters
-semantically add a negative specifier into the version, where
-.QW a
-is -2, and
-.QW b
-is -1. Each may be specified only once, and
-.QW a
-and
-.QW b
-are mutually exclusive in a specifier. Thus 1.3a1 becomes (semantically)
+semantically add a negative specifier into the version, where 'a' is
+-2, and 'b' is -1. Each may be specified only once, and 'a' or 'b' are
+mutually exclusive in a specifier. Thus 1.3a1 becomes (semantically)
1.3.-2.1, 1.3b1 is 1.3.-1.1. Negative numbers are not directly allowed
in version specifiers.
-A version number not containing the letters
-.QW a
-or
-.QW b
-as specified above is called a \fBstable\fR version, whereas presence
-of the letters causes the version to be called is \fBunstable\fR.
+A version number not containing the letters 'a' or 'b' as specified
+above is called a \fBstable\fR version, whereas presence of the letters
+causes the version to be called is \fBunstable\fR.
A later version number is assumed to be upwards compatible with
an earlier version number as long as both versions have the same
major version number.
@@ -324,7 +276,7 @@ to work unmodified with either version 1.7.3 or version 3.1.
The recommended way to use packages in Tcl is to invoke \fBpackage require\fR
and \fBpackage provide\fR commands in scripts, and use the procedure
\fBpkg_mkIndex\fR to create package index files.
-Once you have done this, packages will be loaded automatically
+Once you've done this, packages will be loaded automatically
in response to \fBpackage require\fR commands.
See the documentation for \fBpkg_mkIndex\fR for details.
.SH EXAMPLES
@@ -346,7 +298,9 @@ if {[catch {\fBpackage require\fR Snack}]} {
# We have the package, configure the app to use it
}
.CE
+
.SH "SEE ALSO"
msgcat(n), packagens(n), pkgMkIndex(n)
+
.SH KEYWORDS
package, version