In general, when you write a file path using SomeSampleModule
, Julia looks for that package in the main (it acts as Julia's top-level module):
julia> using SomeSampleModule
ERROR: ArgumentError: Module SomeSampleModule not found in current path.
Run `Pkg.add("SomeSampleModule")` to install the SomeSampleModule package.
in require(::Symbol) at ./loading.jl:365
in require(::Symbol) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
If not shown as in the preceding error, then it may try to look internally for a package installed from an outside source, typically calling the require
function (SomeSampleModule
).
Conversely, let's suppose you are working on a big project that has many modules in it. Now, a situation may come up wherein you are required to call one module's function into some other module's code. The first and foremost requirement for that to work is the presence of those two modules in the same path!
However, what happens in a situation...