From: Jan N. <jan...@gm...> - 2008-12-12 00:10:07
|
2008/12/11 <dg...@ni...>: > I'm about 30 messages buried in e-mail so forgive > me if someone else has already come forward with > the same solution. No, I didn't see this solution before. Sounds good, only one remark: - What if there are two packages e.g. "tcltest" and "tcltest", where the lower-case package is found first. Then what happens is: package ifneeded tcltest script1 package ifneeded Tcltest script2 package ifneeded tcltest script2\npackage provide tcltest .... So, the lower-case "package ifneeded" for Tcltest overwrites the original "package ifneeded" for "tcltest", so "tcltest" can never be loaded any more. Solution: before doing the second "package ifneeded", check if there already is one. If so, don't overwrite the previous. The nice thing is that this works for C packages and for Modules as well: the script that does the "package ifneeded" determines the casing of the Module filename, nothing changes there. That's very nice. I don't think that using an ensemble for this is even neccessary. This is worth investigating further. Regards, Jan Nijtmans |