When loading packages remotely in Mathematica (extension
.m) one can use the
Import function, which behaves just as
Get. However, one must the manually check the need for loading packages (something that is usually dome with
It is possible to use
Import also within the imported package.
In the examples below one loads package
Import["https://.../Test1.m"], which automatically loads
Test2.m and imports both
Test'Deeptest' namespaces and both funcions
Test1.m, placed somewhere on the WWW server.
firstF::usage = "firstF calls secondF and prepends word first"
firstF := "first, " <> Test`DeepTest`secondF
Test2.m, placed somewhere on the WWW server.
secondF::usage = "secondF returns string second"
secondF := "second"
Thanks to the image_doctor for providing the initial help.