I want to dynamically include functions from files based on condition.
Below code gives you an Idea.
File1.jl
function foo()
println("In File1.jl")
end
File2.jl
function foo()
println("In File2.jl")
end
Main.jl
function main(get_func_from)
if get_func_from=="File1.jl"
include("File1.jl")
foo()
end
end
Please note that I don’t want to include File1, File2 under global scope and want to call foo and include file only when needed.