You can split the module into several modules (which will, of course, have to 
be 
enabled). In your example, the block code could be in a separate module (see 
http://drupal.org/project/weblinks). However, any opcode caching that you use 
is 
going to keep more execution-ready code in memory than you might think. My last 
customer used e-Accelerator with a 32 MB cache size and this was a tremendous 
boost to performance, but with smaller memory (VPS, shared) installations, may 
not be the best idea.

@jcisio: To be more precise, the hooks must be in your .module namespace. I 
found this by accident when I started playing with sub-modules. For example, 
create a xyz.module, then create xyz_sub.module with xyz_block(); you will find 
that the blocks are available as though they were in xyz.module.
 
Nancy
 
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.



________________________________

From: jcisio
It depends on which Drupal you are using, D6 or D7. Read the
documentation about D7, where you can split your .module into multiple
files.

In D6, in general, all hook implementations must be presented in your
.module file. However, except your module is too big, this micro
optimization has only negligeable profit.

Reply via email to