$modversino['sub'] can be extended as RECURSIVE like ...
array(
'name' => (name of this node)
'url' => (relative link from XOOPS_URL/modules/dirname/ )
'sub' => (array of sub nodes)
) ,
Then you can get hierarchical submenus for theme's power.
When you assign the submenus for your theme, you should call XoopsModule::getInfo('sub') instead of XoopsModule::subLink().
$module->subLink()
$module->getInfo('sub')
This code flagment will be useful for the agility of your module. In function of dirname_get_submenu, you should cache the result as a static variable.