Listing all names available in a module, part 2

You can do it iteratively:

nms = names(MyModule; imported=true)
for mod in Base.loaded_modules_array()
    if isdefined(MyModule, nameof(mod))
        append!(nms, names(mod))
    end
end
7 Likes