Yes, this worked too, Thank you.! julia> module X export f g(x) = 2x function f(x) (current_module()).g(x) end end X
julia> module Y using X g(x) = 4x println(f(4)) end 16 Y julia> module Z using X g(x) = 5x println(f(4)) end 20 Z On Wed, Feb 17, 2016 at 4:44 PM, Lutfullah Tomak <tomaklu...@gmail.com> wrote: > Hi > Will this achieve what you want? > > module Z > g()=println("Z.g") > function h() > (current_module()).g() > end > end > module X > using Z > g()=println("X.g") > function f() > Z.h() > (current_module()).g() > end > end > module Y > using X > g()=println("Y.g") > X.f() > end > > using Y > > It prints Y.g twice. Or do you want h() to use X's g()?