^use[file]
Operator use allows using a module from specified file. If path begins with symbol "/", it will be regarded as path from Web-space root. In any other case, Parser will look for the module in directories specified in variable $CLASS_PATH in Configuration method.
The following construction can be used to link modules, too:
@USE
filename 1
filename 2
The difference between these constructions lies in that @USE loads a module before a code is executed, while operator use can be called right from the script's body. For example:
^if(condition){
^use[module1]
}{
^use[module2]
} Note: attempts to use a module which were already used would not cause reread of that module. But it must be kept in mind, that for that full file name of the module being used must fully match with the one that were used before. In case^use[module.p] and ^use[sub/../module.p] were issued, Parser would consider those modules different.
We do recommend that you save the results of code's work by linking necessary modules with operator use within the code of operator cache.