Version 1 of tclPkgSetup

Updated 2009-06-02 11:25:20 by LV

This proc is defined in tcl's package.tcl library file.

This is a utility procedure use by pkgIndex.tcl files. It is invoked as part of a "package ifneeded" script. It calls "package provide" to indicate that a package is available, then sets entries in the auto_index array so that the package's files will be auto-loaded when the commands are used.

Arguments:

dir
Directory containing all the files for this package.
pkg
Name of the package (no version number).
version
Version number for the package, such as 2.1.3.
files
List of files that constitute the package. Each element is a sub-list with three elements. The first is the name of a file relative to $dir, the second is "load" or "source", indicating whether the file is a loadable binary or a script to source, and the third is a list of commands defined by this file.