in reply to Re^2: Was a module use'd or require'd? (CHECK?)
in thread Was a module use'd or require'd?
Putting a subref on @INC looks like the best bet. It should be possible to tell the cases from another by looking at some levels of caller(). One problem here is to make sure you are always called. If someone unshifts new components onto @INC in front of you, you may never be for some modules.
Update: tie-ing @INC could help. It isn't magical, so tie should be no problem.
Anno
|
---|