I have created a module that read some data from files. I tried storing the file content in a variable like shown below. But this method doesn’t update the name variable from the file even if i restart the julia session. Is there any way to force reading the file and redefine the constant when I import the package?
module TestModule
const name = open(expanduser("~/name")) do io
String(read(io))
end
greet() = print("Hello $name")
end # module TestModule