colinfang
colinfang

Reputation: 21757

Is it bad to have 2 modules in a package?

Suppose I have a package MyTest,

MyTest/src/MyTest.jl
MyTest/src/A.jl

A.jl:
    module A ... end

MyTest.jl
    module MyTest
    using A
    ...
    end

When I loaded the package from Pkg.clone("..") and using MyTest, it complained that it could not find A. What's the standard way to deal with multiple modules in a package? Or does Julia encourage a single top level module?

Upvotes: 4

Views: 181

Answers (1)

tholy
tholy

Reputation: 12179

For a good example of a package with many internal modules, see the Debug package.

Upvotes: 2

Related Questions