![]() ![]() Due to this feature, a load script should not attmpt to initialize the loaded package, as it may already have been initialized. This is useful for updating a package in a running interpeter. A subsequent package require causes the load script for the package to be evaluated again. Reloading a packageĠ Guidelines for Package Development reloadable package forget removes from an interpreter information that the package is loaded, but does not undo the effects of loading the package. If the package ifneeded database does not contain an acceptable version of the package and a package unknown command has been registered then that command is evaluated in the global namespace, after which package require looks for the package in the database again. The script must call package provide with the proper version. To provide the required package, package require evaluates the selected script in the global namespace. pkgIndex.tcl files are searched for in directories given in $auto_path, and in their immediate subdirectories. To find the required package, package require selects the highest acceptable version in a database that is built from calls to package ifneeded in pkgIndex.tcl files the first time a package routine is called. If a matching version has already been provided, its version number is returned and no other action is taken. If both -exact and version are omitted then any version is acceptable. If -exact is omitted but version is specified, any version is acceptable whose major version is the same as version and whose minor version is equal to or greater than version. If both the -exact and version are provided then only the exact version specified is acceptable. package require returns the version that was provided, or an error. ![]() If a version specification is provided, only a matching version is selected. Package require evaluates a script that must provide the requested package. Package require ?- exact ? package ?version? Description Package require evaluates a script when a certain package is required and then ensures that the package is present. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |