[Israel.pm] Removing PERLLIB additions to @INC
david.baird at homemail.com
Wed Jan 14 00:37:39 PST 2004
Written by: Yuval Kogman
> > In a situation where I don't want additions made by the end user
> > through PERLLIB, this seems to be the most straight forward
> > approach.
> Well, additions from the user will still happen.
You mean they will define PERLLIB. I know. I want my script to ignore
> > I need to make sure that my script only loads modules from my
> > specialized Perl installation.
> If something else /will/ break, Gabor's solution is more sane. If you
> would just like precedence for the core modules, yours would do it.
Just want precedence for the core modules.
> Gabor's solution has one disadvantage - things that are supposedly
> cross platform, and which the user wants added, will not be available,
> and will cause a lot of headache.
And what do I care if the user wants to add them? I am protecting the
execution of a script loading standard modules. No user will "add" to my
> no env qw/PERLLIB/; # or PATH, or all... whatever.
> use strict;
> use warnings;
> use Socket;
> Could be useful if made complete, and surprise - it's not on CPAN
> yet. =)
> Ofcourse, it will only work so far, not modifying perl's runtime
> itself, but it still might be useful for these kinds of situations.
> Any takers?
A simpler question for me is, why is there no option to the perl runtime
to ignore the PERLLIB variable? Since my particular script is executed
by an eternal program using a specialized Perl, I've also looked into
undefining PERLLIB before it calls my script.
More information about the Perl