module A foo(???) = println("I've been called from $???") end module B import A A.foo() # should pring "I've been called from B" end
Is it possible to get this behavior, i.e. find out the caller’s module without requiring it to explicitly pass
@__MODULE__? I tired:
But for obvious reasons it returns the module of
foo itself instead of the caller.