diff --git a/doc/src/manual/modules.md b/doc/src/manual/modules.md index 9aaceea0c13fe..6b335305ac569 100644 --- a/doc/src/manual/modules.md +++ b/doc/src/manual/modules.md @@ -108,7 +108,11 @@ To mark a name as public without exporting it into the namespace of folks who ca one can use `public` instead of `export`. This marks the public name(s) as part of the public API, but does not have any namespace implications. The `public` keyword is only available in Julia 1.11 and above. To maintain compatibility with Julia 1.10 and below, use the `@compat` macro from the -[Compat](https://github.com/JuliaLang/Compat.jl) package. +[Compat](https://github.com/JuliaLang/Compat.jl) package, or the version-aware construct + +```julia +VERSION >= v"1.11.0-DEV.469" && eval(Meta.parse("public a, b, c")) +``` ### Standalone `using` and `import`