Make block render right after enabling the module I'm working on a module which renders a small block in a footer region. My goal is to make it work out of the box with default settings. User just needs to enable it with drush, no configuration required.

In Drupal 6 version I stumbled upon a strange problem. Looks like after enabling module it's hook_block isn't called, so block isn't rendered. It can be fixed either by doing drush cc all or going to blocks admin page. All caching is disabled on the test site.

I tried to incorporate drupal_flush_all_caches and drupal_cache_clear into hook_install without success. 

Can someone give a hint?
After some trials I found an easy workaround:


function mymodule_enable() {
  _block_rehash();
}


It's function which get called then one visits /admin/build/block. It rescans blocks provided by modules.