[erlang-questions] Retrieve all auto-imported functions

Robert Virding robert.virding@REDACTED
Mon Jan 30 18:48:16 CET 2012


I don't know why it does this, it doesn't make sense. Of course import in Erlang doesn't do what many expect, ALL it does is a little name munging so you don't need to write the module name when calling the imported functions. The functions aren't "imported" into the module in any way or become special in any way. It only provides some syntactic sugar and has no semantic meaning at all.

Robert

----- Original Message -----
> No answer, just removing a dead-end. Given a simple module(*) I get
> the
> following:
> 5> t:module_info(imports).
> []
> 
> 
> Perhaps this is Erlang/OTPs way to remind us to avoid -import()?
> 
> 
> bengt
> 
> (*)
> -module(t).
> -export([t/0]).
> -import(lists, [reverse/1]).
> t() -> reverse([1,2,3]).
> 
> 
> On Sun, 2012-01-29 at 19:40 +0100, José Valim wrote:
> > Is there a way to retrieve all auto-imported functions in parse
> > time
> > and/or runtime?
> > 
> > 
> > erlang:module_info(exports) also returns non auto-imported
> > functions.
> > 
> > 
> > Thanks in advance,
> > 
> > 
> > José Valim
> > www.plataformatec.com.br
> > Founder and Lead Developer
> > 
> > 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> 



More information about the erlang-questions mailing list