in reply to How to specify a specific Module::subroutine as command option

You may just have mistyped while posting but you want:
$function->($document); # or &$function($document);
You might want to check out use autouse;instead, if your modules are fairly stable.  On the other hand, the loading of hundreds of subroutines may not be as bad as you think and the extra indirection through symbolic references adds its own overhead. Have you benchmarked or watched memory usage?  Also, of course, the user has to call the right module and function and spell them right (and you have to turn off strict 'refs' for the call).  Its the sort of thing that makes one think "there must be a better way".

  p