A very Luaish way to address the issue.
Diego Nehab wrote:
> How about you set the __index metamethod of the package.preload table and
> use it to trap package load attempts and dispatch them any way you might
> want?