I was looking at the examples from https://docs.julialang.org/en/stable/manual/modules/#Summary-of-module-usage-1 and the “What is brought into scope” info for “importall MyModule” doesn’t seem to be right (at least not in the way I understand it). It says it only brings into scope x
and y
. So I would expect, for example, that MyModule.x
or MyModule.p
will not be brought into scope. But that is not the case.
In fact, in regards to “What is brought into scope”, the effect of importall
is exactly like the effect of using
, so the doc should show the same thing.
julia> using MyModule
julia> x()
"x"
julia> y()
"y"
julia> MyModule.x()
"x"
julia> MyModule.y()
"y"
julia> MyModule.p()
"p"
julia> importall MyModule
julia> x()
"x"
julia> y()
"y"
julia> MyModule.x()
"x"
julia> MyModule.y()
"y"
julia> MyModule.p()
"p"