[erlang-questions] getting application name in parse transform

Alex S. alex0player@REDACTED
Thu Dec 22 17:17:43 CET 2016


No wonder it does, too: get_application does its thing for compiled and
loaded modules.

22 дек. 2016 г. 17:22 пользователь "John Doe" <donpedrothird@REDACTED>
написал:

> Hi,
> Is there a way to get in a parse transform the name of the application the
> module belongs to? The parse_transform function has parameter Options so it
> is possible to add an argument to erlc with app name, but is it possible to
> get the name of the app automatically?
>
> I tried
> {attribute, _, module, ModuleName} = lists:keyfind(module, 3, Forms),
> application:get_application(ModuleName),
> but it returns undefined
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161222/296719b8/attachment.htm>


More information about the erlang-questions mailing list