I’m now trying to get the @moduledoc module attribute in a __using__ macro but in:
{line_number, existing_moduledoc} =
Module.delete_attribute(__MODULE__, :moduledoc) || {0, ""}
Module.put_attribute(
__MODULE__,
:moduledoc,
{line_number, existing_moduledoc <> additional_doc})
Module.delete_attribute/2 always returns nil (although the @moduledoc is set) and Module.put_attribute/3 doesn’t set it (nothing in generated doc).
Is there an exception with @moduledoc? I suspect it is not set yet when calling Module.delete_attribute/2. Also Module.put_attribute/3is later erased by the plain @moduledoc (I’ve tested it - no @moduledoc in the target module results in additional_doc being displayed).


















