julia> module A
a = 1
b = 2
end
Main.A
julia> a
ERROR: UndefVarError: `a` not defined
julia> A.a
1
julia> A.b
2
julia> using A
ERROR: ArgumentError: Package A not found in current path, maybe you meant `import/using .A`.
- Otherwise, run `import Pkg; Pkg.add("A")` to install the A package.
Stacktrace:
[1] macro expansion
@ Base .\loading.jl:1766 [inlined]
[2] macro expansion
@ Base .\lock.jl:267 [inlined]
[3] __require(into::Module, mod::Symbol)
@ Base .\loading.jl:1747
[4] #invoke_in_world#3
@ Base .\essentials.jl:921 [inlined]
[5] invoke_in_world
@ Base .\essentials.jl:918 [inlined]
[6] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1740
why is it wrong?