Global pseudonym for module

have module A.B. And another module A.C is the same. do not want to copy. is there a way to create GLOBAL pseudonym? smth like alias A.B as: A.C but not inside the module, site-wide.
the reason: i have some API as a requirement (incl module names) and already have a module with functional needed.

UPD: and yeah, actually modules are surface components, so i’ve failed when trying to use third module with all the stuff inside __using__ macro(((

erlang 25.2
elixir 1.14.1

thanks in advice!

If I got your question right, you are required to create a new module that follows the same public API as some other module that you already have. You also don’t want to copy code over from the existing module to the new one.

Have you looked at using defdelegate/2 (docs) to achieve what you’re looking for?

defdelegate/2 helps with functions, but not with module-level macros and use’d modules.
but thanks! this is much better than nothing.
maybe there is smth like moddelegate?

-snip-

I wondered what the issue was, but after re-reading it seems there are duplicate module names and you want to ‘change the name’ of the external one. Right?

i want to create a module with new name (it’s requirement) but with all the functionality of the existing module (also internal) without code duplicating