Sujet : Re: typical TCL docu nonsens
De : heller (at) *nospam* deepsoft.com (Robert Heller)
Groupes : comp.lang.tclDate : 21. Jun 2024, 13:25:07
Autres entêtes
Organisation : Deepwoods Software
Message-ID : <Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com>
References : 1
User-Agent : TkNews 3.0 (1.2.18)
At Fri, 21 Jun 2024 11:40:25 +0200 aotto1968 <
aotto1968@t-online.de> wrote:
typical TCL "package" horror
# I know finally the "autopath" is the WRONG name
lappend autopath /some/path/to/package/dir
The correct name is auto_path. The docs say so:
auto_path
If set, then it must contain a valid Tcl list giving directories
to search during auto-load operations (including for package inâ
dex files when using the default package unknown handler). This
variable is initialized during startup to contain, in order: the
directories listed in the TCLLIBPATH environment variable, the
directory named by the tcl_library global variable, the parent
directory of tcl_library, the directories listed in the tcl_pkgâ
Path variable. Additional locations to look for files and packâ
age indices should normally be added to this variable using lapâ
pend.
Additional variables relating to package management exist. More
details are listed in the VARIABLES section of the library manâ
ual page.
Where did you see "autopath"?
package require FileLib
>>
can't find package FileLib
while executing
"package require FileLib"
----
â go into the directory
sbin> cat pkgIndex.tcl
package ifneeded FileLib 2.0 [list source [file join $dir FileLib.tcl]]
package ifneeded StdLib 2.0 [list source [file join $dir StdLib.tcl]]
----
â try to debug, add "set tcl_traceExec 1"
â get a lot of "nonsens" (important info cut away)
Calling proc "::unknown" "::tcl::tm::Unkn..." "::tclPkgUnknown" "FileLib" "0-"
Calling proc "auto_load" "::tcl::tm::Unkn..." "::"
Calling proc "auto_qualify" "::tcl::tm::Unkn..." "::"
Calling proc "auto_load_index"
Calling proc "::tcl::tm::Defa..."
Calling proc "roots" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "::tcl::tm::Unkn..." "::tclPkgUnknown" "FileLib" "0-"
Calling proc "::unknown" "::tclPkgUnknown" "FileLib" "0-"
Calling proc "auto_load" "::tclPkgUnknown" "::"
Calling proc "auto_qualify" "::tclPkgUnknown" "::"
Calling proc "::tclPkgUnknown" "FileLib" "0-"
Calling lambda "apply" "{dir} {\n se..." "/home/dev1usr/e..."
can't find package FileLib
while executing
"package require FileLib"
---
call: man n package
â check for the term "path" â not found in manpage
â a lot of text but NOT a single word how to setup the path to get the package found !!
----
after some research the right name is "auto_path"
mfg ao
-- Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364Deepwoods Software -- Custom Software Serviceshttp://www.deepsoft.com/ -- Linux Administration Servicesheller@deepsoft.com -- Webhosting Services