As the require manpage mentions, if you put a coderef in @INC, it will get processed every time a module gets 'used' or 'required'.