Subject: | should not attempt "Foo/Bar" if "Foo/Bar.pm" was found (but didn't compile) |
Suppose file Foo/Bar.pm exists but contains a compilation error.
load "Foo/Bar.pm" correctly reports the compilation error.
load "Foo::Bar" reports the compilation error, but then it adds the error message "Can't locate Foo/Bar in @INC". This additional message is misleading.
If the first iteration of the LOAD: loop did find the file but failed to load it, it should abort the loop instead of trying another iteration with $flag == 0.