in reply to Re: Overriding the built-in require function (@INC)
in thread Overriding the built-in require function
But this of course fails if someone happens to do
as lib also unshifts @INC. This accident may not be obvious if it's a module that uses lib.BEGIN { unshift @INC, sub { ... } } use lib 'somewhere/special'; require Net::Ping; # Resolves to "somewhere/special/Net/Ping.pm".
For many purposes it works, but one should be aware of that it's not bullet proof against accidents.
lodin
|
|---|