phgrey
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!
First Post!
juhalehtonen
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?








