Subject: | Should consider PERLLIB as well |
Should perl5lib add dirs in $ENV{PERLLIB} if $ENV{PERL5LIB} is not
defined? That's what perl does itself, and PERLLIB is affected by taint
mode just like PERL5LIB.
I suppose something like this would do the trick:
use lib map { /(.*)/ } split /$Config{path_sep}/ =>
defined($ENV{PERL5LIB}) ? $ENV{PERL5LIB} : $ENV{PERLLIB};
Using "defined" instead of simply "$ENV{PERL5LIB} || $ENV{PERLLIB}"
because that's what perl itself is documented to do (and so that
PERL5LIB=0 works).