# Exportall?

**URL:** <https://discourse.julialang.org/t/exportall/4970>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 20, 2017, 8:52am UTC](https://discourse.julialang.org/t/exportall/4970 "2017-07-20T08:52:27Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Post date:** [July 22, 2020, 9:47pm UTC](https://discourse.julialang.org/t/exportall/4970/16 "2020-07-22T21:47:08Z")

</div>

Here’s a version of the export-all code chunk from @stevengj that is updated for Julia v1.0. (Well, for v1.4 at least. I haven’t tested on v1.0).

```julia
# export all
for n in names(@ __MODULE__ ; all=true)
    if Base.isidentifier(n) && n ∉ (Symbol(@ __MODULE__ ), :eval, :include)
        @eval export $n
    end
end

```

When I’m developing a new package, I find it pretty convenient to just export all the functions in the package. Later when the code stabilizes I can choose which functions to export, but initially I’m usually the only user of my package and it’s easier just to export everything.

Here’s the new code in action:

```julia
julia> module Foo
           x = 1
           y = 2
       
           for n in names(@ __MODULE__ ; all=true)
               if Base.isidentifier(n) && n ∉ (Symbol(@ __MODULE__ ), :eval, :include)
                   @eval export $n
               end
           end
       end
Main.Foo

julia> using .Foo

julia> x
1

julia> y
2

```

---

_[View the full topic](https://discourse.julialang.org/t/exportall/4970)._
