How do I determine if a Scala module is opened as script or if it is regularly imported?
This question is about the same issue as previous Python question:
how do I determine whether a python script is imported as module or run as script?
but for Scala