module import rules

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 25 13:21:10 PST 2015


On Wednesday, 25 February 2015 at 21:14:17 UTC, module wrote:
> I was following the process of importing modules as described 
> in TDPL and Ali's book and they both claim that "By default, 
> the name of a module is the same as its filename without the .d"

That's true but the key thing is it is the filename... which 
doesn't include the directory name. That's why it mismatches when 
you start to use packages. You imported it as package.module, but 
the file name is just module.d, making the automatic module name 
plain "module", without the attached package/directory name.


More information about the Digitalmars-d-learn mailing list