in reply to
Re: use lib './' security safe?
in thread use lib './' security safe?
unshift would be bad. That puts "./" at the start of the search list, which means standard module names could be overridden by placing bogus ones in the CWD.
but it isn't going to affect use statements, since those are evaluated at compile time. So,
is even better.
use lib "./";
But best is:
Update: use lib "./"
use lib /some/absolute/path/that/you/control;
is worse than unshift @INC,"./"
because it also prepends "./" to the search path, but does so at compile time, where it can affect other use