Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: use lib './' security safe?

by hbo (Monk)
on Jul 20, 2004 at 04:06 UTC ( #375789=note: print w/ replies, xml ) Need Help??


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.
push @INC,"./";
Better, but it isn't going to affect use statements, since those are evaluated at compile time. So,
use lib "./";
is even better.
But best is:
use lib /some/absolute/path/that/you/control;
Update: use lib "./" 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 statements.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://375789]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2016-07-30 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (265 votes). Check out past polls.