www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Module declaration

reply Paolo Invernizzi <arathorn NOSPAM_fastwebnet.it> writes:
Hi all,

Is it possible to access, in some way, the module name used in the 
module declaration? Something like:

  module the.module.name;
  char[] moduleName = module.name; // assign "the.module.name" to var

Thanks in advance!

---
Paolo Invernizzi
Sep 14 2006
parent Chris Nicholson-Sauls <ibisbasenji gmail.com> writes:
Paolo Invernizzi wrote:
 Hi all,
 
 Is it possible to access, in some way, the module name used in the 
 module declaration? Something like:
 
  module the.module.name;
  char[] moduleName = module.name; // assign "the.module.name" to var
 
 Thanks in advance!
 
 ---
 Paolo Invernizzi

The name is available in the ModuleInfo instance for your module... unfortunately I just plain can't remember how to /get/ the ModuleInfo. Oy. -- Chris Nicholson-Sauls
Sep 14 2006