# How to export names from a lower level module without explicitly listing all of them?

**URL:** <https://discourse.julialang.org/t/how-to-export-names-from-a-lower-level-module-without-explicitly-listing-all-of-them/44104>\
**Category:** New to Julia\
**Created:** [August 1, 2020, 9:18pm UTC](https://discourse.julialang.org/t/how-to-export-names-from-a-lower-level-module-without-explicitly-listing-all-of-them/44104 "2020-08-01T21:18:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhong\_Pan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhong_pan/32/19872_2.png) [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Post date:** [August 1, 2020, 9:18pm UTC](https://discourse.julialang.org/t/how-to-export-names-from-a-lower-level-module-without-explicitly-listing-all-of-them/44104/1 "2020-08-01T21:18:26Z")

</div>

I often organize code into modules inside a single package.

Let’s say I have a pacakge named AB.jl, and inside I have modules A.jl, B.jl, all in the src folder.

A nice way to organize them is demonstrated by Jacob Quinn in the JuliaCon Workshop “Building microservices and applications in Julia”:

```julia
module AB

export A, B

include("A.jl")
using .A

include("B.jl")
using .B

end

```

Now assume module B exports the names “foo” and “bar”:

```julia
module B

export foo, bar

# module code ...

end

```

If I use the package by “using AB”, I will be able to call “B.foo”, “B.bar”.

However, if I want to directly use “foo”, “bar” without the namespace B, the only way I can do that now is explicitly exporting these names at module AB again:

```julia
module AB

export A, B, foo, bar

include("A.jl")
using .A

include("B.jl")
using .B

end

```

If B exports many names, this is both tedious and error prone.

Is there a simpler way to export all names B exports at the level of module AB?

Thanks!

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [August 1, 2020, 10:11pm UTC](https://discourse.julialang.org/t/how-to-export-names-from-a-lower-level-module-without-explicitly-listing-all-of-them/44104/2 "2020-08-01T22:11:09Z")

</div>

[https://github.com/simonster/Reexport.jl](https://github.com/simonster/Reexport.jl)
