Not quite ... you say
...If it's there, then the loading and therefore the compilation are not performed at all... - this is only true of
require,
use and indeed
do, _always_ load the file.
The use of the hash [%INC] in testing is nicely demonstrated in perl Testing - A developers notebook - to name but one.
A user level that continues to overstate my experience :-))