One way would be to place a hook (subroutine reference) as the first element of @INC. This is called when
use is executed, and passed two parameters: the reference itself and the module name. See
require in
perlfunc.
There are also other possibilities, such as a blessed object.