Subject: | The coderef in @INC returns a globref for non-existent files |
pp installs a coderef in @INC.
The func/require POD says of this coderef
The subroutine should return undef or a filehandle,
from which the file to include will be read.
If undef is returned,
require will look at the remaining elements of @INC.
However the coderef installed by pp always returns a filehandle
(actually, a globref), even if the require'd file doesn't exist.
There are programs that depend on the documented behavior.
For example, log4perl explicitly walks @INC looking for require'd files.
It tests the return value of coderefs on @INC to decide whether a
file exists; if it doesn't, it tries to require it under a different name.
When the coderef returns a globref for a file that doesn't exist,
this mechanism in log4perl breaks.