tclPkgSetup

Description

tclPkgSetup is the support/utility command that enables -lazy in package index script. It's defined package.tcl, which is part of the standard Tcl distribution.

tclPkgSetup is deprecated. According to DGP ,irc #tcl channel, 2012-12-03, it's abut three layers of bad ideas deep. For backwards compatibility, it will probably remain available for some time.

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.