June 26, 2005
Walter wrote:
> The module declaration is only needed if the path/file name is different from the desired package/module name.

I see the point in having filename other than module name (but this is only complication of things). But I can't find the way to make directory name different from package name. Using package prefix in module declaration leads only to problems when reorganising files. Using:

module xml.parser;

forces the dir where the file is to be named "xml". In other cases importing of it will always fail. Renaming of "xml" dir to "xmltools" will force a change in all files with module declaration. Did I missed something? (if I'm wrong please someone give me an example how to do that)
-- 
Dawid Ciężarkiewicz | arael
June 27, 2005
Hi there,

>I see the point in having filename other than module name (but this is only complication of things). But I can't find the way to make directory name different from package name. Using package prefix in module declaration leads only to problems when reorganising files. Using:
>
>module xml.parser;
>
>forces the dir where the file is to be named "xml". In other cases importing of it will always fail. Renaming of "xml" dir to "xmltools" will force a change in all files with module declaration. Did I missed something? (if I'm wrong please someone give me an example how to do that)

I have the same problem. The directory seems fixed to the namespace prefix. I'm on Linux with DMD 0.126. I also agree that something should be done about it, because it's a lot of redundant information (directory name/file name + module declaration + import statement).

Cheers,
--AJG.

In article <d9nemm$h8q$1@digitaldaemon.com>, Dawid =?ISO-8859-2?Q?Ci=EA=BFarkiewicz?= says...
>
>Walter wrote:
>> The module declaration is only needed if the path/file name is different from the desired package/module name.
>
>-- 
>Dawid Ciê¿arkiewicz | arael


June 27, 2005
In article <d9o1uf$udd$1@digitaldaemon.com>, AJG says...
>
>Hi there,
>
>>I see the point in having filename other than module name (but this is only complication of things). But I can't find the way to make directory name different from package name. Using package prefix in module declaration leads only to problems when reorganising files. Using:
>>
>>module xml.parser;
>>
>>forces the dir where the file is to be named "xml". In other cases importing of it will always fail. Renaming of "xml" dir to "xmltools" will force a change in all files with module declaration. Did I missed something? (if I'm wrong please someone give me an example how to do that)
>
>I have the same problem. The directory seems fixed to the namespace prefix. I'm on Linux with DMD 0.126. I also agree that something should be done about it, because it's a lot of redundant information (directory name/file name + module declaration + import statement).
>
>Cheers,
>--AJG.
>
>In article <d9nemm$h8q$1@digitaldaemon.com>, Dawid =?ISO-8859-2?Q?Ci=EA=BFarkiewicz?= says...
>>
>>Walter wrote:
>>> The module declaration is only needed if the path/file name is different from the desired package/module name.
>>
>>-- 
>>Dawid Ciê¿arkiewicz | arael
>
>

This is precisely the issue I was referring to, but couldn't get it down in my own words.  Thanks! =)

Regards,
James Dunne
1 2
Next ›   Last »