[erlang-questions] custom module attributes

Bengt Kleberg <>
Thu Sep 27 08:48:40 CEST 2007


greetings,

you can do it now if you are willing to work with the single argument. ex:
-module(a).
-a_custom_attribute([{tag1,1}, {tag2,2}]).

will give you:
()61> a:module_info().
[{exports,[{module_info,0},{module_info,1}]},
  {imports,[]},
  {attributes,[{vsn,[161104697305202649401065793456291489343]},
               {a_custom_attribute,[{tag1,1},{tag2,2}]}]},




bengt
Those were the days...
    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."


On 2007-09-27 00:23, denis wrote:
> Hello,
> 
>  
> 
> I’m wondering if it difficult or not to define custom module attributes, 
> allowing several parameters instead of one, like –compile for instance.
> 
> I’ve not found where it’s defined in the source. Is it managed at the 
> parsing level ? or elsewhere ?
> 
>  
> 
> Thanks for the pointers
> 
> Denis
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list