julia> module XXX
export foo,bar
function foo(amod::Module = current_module())
println(amod)
end
function bar(amod::Module = @__MODULE__)
println(amod)
end
end
Main.XXX
julia> module YYY
using Main.XXX
export f,g
function f()
foo()
end
function g()
bar()
end
end
Main.YYY
julia> using Main.YYY
julia> f()
┌ Warning: `current_module()` is deprecated, use `@__MODULE__` instead.
│ caller = foo at REPL[1]:4 [inlined]
└ @ Core REPL[1]:4
Main
julia> g()
Main.XXX
How can i get the old current_module() functionality?