Skip to content
Tcl Source Code Artifact [e6a93ea6c0]
Login

Artifact [e6a93ea6c0]

Artifact e6a93ea6c03359951c8788e7251eeaef79501d2407b80177e3af837a3a5ab396:



CommandName: pkg::create ManualSection: n Version: 8.3 TclPart: Tcl TclDescription: Tcl Built-In Commands Links:

Name

pkg::create - Construct an appropriate 'package ifneeded' command for a given package specification

Synopsis

::: {.synopsis} ::: [::pkg::create]{.cmd} [-name]{.lit} [packageName]{.arg} [-version]{.lit} [packageVersion]{.arg} [[-load]{.lit} [filespec]{.arg}]{.optdot} [[-source]{.lit} [filespec]{.arg}]{.optdot} :::

Description

::pkg::create is a utility procedure that is part of the standard Tcl library. It is used to create an appropriate fBpackage ifneededfR command for a given package specification. It can be used to construct a fBpkgIndex.tclfR file for use with the fBpackagefR mechanism.

Options

The parameters supported are:

-name fIpackageNamefR : This parameter specifies the name of the package. It is required.

-version fIpackageVersionfR : This parameter specifies the version of the package. It is required.

-load fIfilespecfR : This parameter specifies a library that must be loaded with the fBloadfR command. fIfilespecfR is a list with two elements. The first element is the name of the file to load. The second, optional element is a list of commands supplied by loading that file. If the list of procedures is empty or omitted, fB::pkg::createfR will set up the library for direct loading (see fBpkg_mkIndexfR). Any number of fB-loadfR parameters may be specified.

-source fIfilespecfR : This parameter is similar to the fB-loadfR parameter, except that it specifies a Tcl library that must be loaded with the fBsourcefR command. Any number of fB-sourcefR parameters may be specified.

At least one fB-loadfR or fB-sourcefR parameter must be given.