For example, if I create file jopa.erl with this code inside ...
-module(jopa).
...everything compiles without errors
However, if I put this code inside jopa.erl ...
-module(lol).
and try to compile...
2> c(jopa).
./jopa.beam: Module name 'lol' does not match file name 'jopa'
error
... I see an error
So, what's the point to specify module name if script even doesn't compile with another filename?