# List of packages imported with "using" in a module

**URL:** <https://discourse.julialang.org/t/list-of-packages-imported-with-using-in-a-module/99658>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 31, 2023, 8:49am UTC](https://discourse.julialang.org/t/list-of-packages-imported-with-using-in-a-module/99658 "2023-05-31T08:49:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [May 31, 2023, 8:49am UTC](https://discourse.julialang.org/t/list-of-packages-imported-with-using-in-a-module/99658/1 "2023-05-31T08:49:45Z")

</div>

```julia
module A
  using B
end

```

is there `somefunction(A)` that returns a list which contains `:B` ? If `B` is imported, `names` does the job:

```julia
module A
  import B
end
names(A, imported=true) # [:A, :B]

```

I’d ideally like something that can cover both cases (import+using). (The use case is to be able to check that `A.B` will work, I can explicitly check this but it doesn’t feel like the right approach)

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [May 31, 2023, 8:56am UTC](https://discourse.julialang.org/t/list-of-packages-imported-with-using-in-a-module/99658/2 "2023-05-31T08:56:24Z")

</div>

Hmm, after looking at the julia code for `getglobal` I stumbled upon `isdefined` which is what I should be using it seems:

```julia
isdefined(A, :B) # true

```
