# How to divide a project into files and submodules?

**URL:** <https://discourse.julialang.org/t/how-to-divide-a-project-into-files-and-submodules/131593>\
**Category:** General Usage\
**Tags:** module, code-organization\
**Created:** [August 13, 2025, 4:46pm UTC](https://discourse.julialang.org/t/how-to-divide-a-project-into-files-and-submodules/131593 "2025-08-13T16:46:22Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 13, 2025, 10:45pm UTC](https://discourse.julialang.org/t/how-to-divide-a-project-into-files-and-submodules/131593/5 "2025-08-13T22:45:00Z")

</div>

> [@Snowy](#):
>
> ```julia-auto
> module test_functions
> import .my_structs
> 
> ```

Should be `using ..my_structs` — you need `..` because it’s being imported by the enclosing module, and you need `using` because you want to use the unqualified exported symbols.

PS. `export` is syntax, not a function. You don’t need parens — you can just do `export Prod1, Prod2`, for example.

PPS. `include(".\\my_structs.jl")` can just be `include("my_structs.jl")` — it’s automatically relative to the directory of the current file.

PPPS. In the example here I would generally not bother with submodules at all. There is no need to have a new module for every file, and most projects do not do this. See also [Best practise: organising code in Julia - #2 by stevengj](https://discourse.julialang.org/t/best-practise-organising-code-in-julia/74362/2)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-divide-a-project-into-files-and-submodules/131593)._
