[erlang-questions] Why we need a -module() attribute?
Tue Feb 23 20:53:54 CET 2016
On 02/23/2016 10:12 AM, Judson Lester wrote:
> I'd really like to be able to put that in src/myapp/part/subpart.erl -
> maybe this is a misapprehension turned superstition, but I was under the
> impression that I'd need to have a whole separate build step to copy the
> latter into the former before handing it to erlc. Is that not the case?
It doesn't seem to be the case. This works just fine for me with Erlang 18:
$ mkdir -p dir/with/parents
$ echo "-module (test).
> -compile (export_all).
> run() -> ok." > dir/with/parents/test.erl
$ erlc dir/with/parents/test.erl
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the erlang-questions