Is it possible to use eval of the enclosing module? So if I have:
module A
@eval x = 1
end
module B
using ..A
end
I would like to get a handle for B inside A and pass that as the first argument to @eval. Is such a thing possible? Base.parentmodule is not what I want.
No not really, it’s the opposite. I want to be able to evaluate expressions in Main from A if I ran using A in Main, but not just Main, any module that calls using A.