More of a hack than a real solution: if you control the hosting environment, you can always replace require with your version of it:
local require_original = require
function require(module)
-- do something with the module name
require_original(module)
end