Splitting up the .module file I wrote my first module which happens to be in Drupal 7. The module uses hook_menu to correlate URLs with three custom-coded, page call backs. These callback functions that construct the custom html are currently inside the .module file.  

The file is getting a little long and I would like to put the three custom-coded page call backs into another file. My first attempt did not work this morning, I'm not sure what I did wrong...

1) Added this line to the .info file:

files[] = my_module.pages.inc


2) Placed the callbacks into my_module.pages.inc

What is wrong or missing in this approach?
You can enter a file parameter in the hook_menu function and the file will be included before calling the page callback function.

&lt;?php
function my_module_menu() {
  $items = array();
  $items['my/custom/path'] = array(
    'title' =&gt; 'My title',
    'page callback' =&gt; 'my_function',
    ...
    'file' =&gt; 'my_module.pages.inc',
  );
  return $items;
}


Now, you can place your my_function in the my_module.pages.inc file. 
You can place submit and validate handlers (forms) in this page as well. 

files[] = my_module.pages.inc


will not work. It's to autoload classes. A good example would be Views file includes.