Re: [julia-users] How do you use "using" inside a function now that "require" is deprecated?
Hi I am having the same problem, but while loading a module for parallel processing. Before this deprecation message I was using require("file.jl") since both "using" and "include" do not work (the other processes do not know about such file). I wonder why this change is happening, but I cannot find any documentation about it. On Wednesday, July 29, 2015 at 8:27:47 AM UTC-3, Yichao Yu wrote: > > On Wed, Jul 29, 2015 at 7:00 AM, Sheehan Olver > wrote: > > The below code used to work to lazy load a module, but now is > deprecated, > > with the warning saying to use `using` or `import`. But `using` doesn't > > work inside a function. What should be done? > > > > ```julia > > function foo2() > >require("StatsBase") > > @eval using StatsBase > > > end > > ``` >
Re: [julia-users] How do you use "using" inside a function now that "require" is deprecated?
On Wed, Jul 29, 2015 at 7:00 AM, Sheehan Olver wrote: > The below code used to work to lazy load a module, but now is deprecated, > with the warning saying to use `using` or `import`. But `using` doesn't > work inside a function. What should be done? > > ```julia > function foo2() >require("StatsBase") @eval using StatsBase > end > ```
[julia-users] How do you use "using" inside a function now that "require" is deprecated?
The below code used to work to lazy load a module, but now is deprecated, with the warning saying to use `using` or `import`. But `using` doesn't work inside a function. What should be done? ```julia function foo2() require("StatsBase") end ```