From: Andreas K. <and...@ac...> - 2007-03-19 20:17:06
|
> I ran into an issue with the statistics package that > has to do with the test utilities, most notably the > useLocal command. > > The introduction of the multivariate linear regression > procedures by Eric Kemp-Benedict made the statistics package > depend on the linear algebra package. This is not a problem, > but it made it necessary to _explicitly_ load the package > via "useLocal" in the preamble to the tests (despite the > package require command). > > Can anyone explain under what circumstances this useLocal > command is needed and why? > > (I get error messages about an unknown namespace otherwise). useLocal ... When you have a tcllib package FOO depending on a Tcllib package BAR the testsuite cannot simply do 'package require BAR'. Because if you do you are in the danger of not getting the version of BAR which is in the Tcllib you are working with, but some previously installed version of BAR, likely older, likely different. So I added commands to devtools/testutilities which allow you to load a Tcllib package directly, without going through the regular package management. The main commands are 'useLocal' and 'use'. The first of these assumes that the package BAR you want is in the same module as the using package FOO. This is the case for mvlinreg and linalg, both are in the math module. 'use' OTOH just assumes the BAR is somewhere in Tcllib, and you have to specify the module as well, as part of the path to the file you are loading. I.e. if BAR is in mode ZAT you say use ZAT/BAR bar ... Does the above make sense ? -- Andreas Kupries <and...@Ac...> Developer @ http://www.ActiveState.com Tel: +1 778-786-1122 |