This proc is defined in tcl's package.tcl library file.
It is a routine called when a package require statement fails. It is the default proc for the package unknown function. Its arguments are the name of the desired package, version of the package, and -exact flag or nothing. It uses the auto_path variable to go looking through the directories for a hit.Obsolete bugs
NB a recent (2006-2007) bug for users of OpenCascade on Windows (which uses Tcl to drive its test harness and other uses) is that if you have 8.4.14 installed and OpenCascade 6.1 then the command:
package require BWidgets
tclPkgUnknown name version ?exact?
This can be cured by renaming the directory C:\OpenCASCADE6.1.0\3rdparty\win32\tcltk to C:\OpenCASCADE6.1.0\3rdparty\win32\tcltkz (or any other name that is not in the path command).
Suggests that there are 2 versions of tclPkgUnknown in the sytem with different calling conventions.
MHo: What's this?:
D:\Home\Arbeit1\pgm\tcl\usr\Tst\execx2\test>tclkitsh execx2test.tcl invalid command name "tclPkgUnknown" while executing "tclPkgUnknown execx2 0.1" ("package unknown" script) invoked from within "package require execx2 0.1" invoked from within "puts [package require execx2 0.1]" (file "execx2test.tcl" line 8) D:\Home\Arbeit1\pgm\tcl\usr\Tst\execx2\test>tclkitsh % info patch 8.4.19 %
This is not the case if I call tclsh 8.5.7 from ActiveState…