>Thanks, so the code is only executed when the module was previously loaded 
right?

No, I believe that if the module is loaded in the future, the code is 
executed then. The code is executed immediately if the module has been 
previously loaded. See Mike's comments at that issue: 
https://github.com/JuliaLang/julia/issues/2025#issuecomment-67733391

Regards
-
Avik

On Tuesday, 23 December 2014 18:57:37 UTC, Tobias Knopp wrote:
>
> Thanks, so the code is only executed when the module was previously loaded 
> right?
>
> Am Dienstag, 23. Dezember 2014 16:10:55 UTC+1 schrieb tshort:
>>
>> Not quite what you're asking, but see some discussions in this issue:
>>
>> https://github.com/JuliaLang/julia/issues/2025
>>
>> Particularly, see the note on Mike Innes's require macro. Here is an 
>> example in action for supporting multiple plotting mechanisms:
>>
>>
>> https://github.com/one-more-minute/Jewel.jl/blob/b0e8c184f57e8e60c83e1b9ef49511b08c88f16f/src/LightTable/display/objects.jl#L168-L170
>>
>>
>>
>> On Tue, Dec 23, 2014 at 9:42 AM, Tobias Knopp <tobias...@googlemail.com> 
>> wrote:
>>
>>> Sorry if this has already been answered. Its about optional plotting 
>>> functionality in a package. More precisely I want to have some Winston / 
>>> Gtk based plotting things and some PyPlot plotting routines.
>>>
>>> Is there a possibility to have submodules in a package so that the main 
>>> module can be used without the subfunctionality?
>>>
>>> e.g.
>>>
>>> using Foo 
>>>
>>> works does not require Winston/Gtk/PyPlot
>>>
>>> using Foo, FooGUI
>>>
>>> does require Winston and Gtk and
>>>
>>> using Foo, FooMyBeautifulPlots
>>>
>>> requires PyPlot?
>>>
>>> Thanks
>>>
>>> Tobi
>>>
>>
>>

Reply via email to