diff options
author | David Golden <dagolden@cpan.org> | 2011-07-20 18:14:03 -0400 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2011-07-20 18:14:03 -0400 |
commit | 50646f6f0beccf4783bfef8cb75375f49c727140 (patch) | |
tree | 4c578e9421ee19a308a3de2de0b8322f3c7ab5ac /utils/perlivp.PL | |
parent | 1889cb121b9e7ded9549eb33573d4b403a6e5f18 (diff) | |
download | perl-50646f6f0beccf4783bfef8cb75375f49c727140.tar.gz |
Make perlivp ignore PERL5LIB and current directory
Diffstat (limited to 'utils/perlivp.PL')
-rw-r--r-- | utils/perlivp.PL | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/perlivp.PL b/utils/perlivp.PL index f5963e8957..91a2e4f3fd 100644 --- a/utils/perlivp.PL +++ b/utils/perlivp.PL @@ -135,6 +135,14 @@ else { } $tests_total++; +# We have the right perl and version, so now reset @INC so we ignore +# PERL5LIB and '.' +{ + local $ENV{PERL5LIB}; + my $perl_V = qx($perlpath -V); + $perl_V =~ s{.*\@INC:\n}{}ms; + @INC = grep { length && $_ ne '.' } split ' ', $perl_V; +} print "## Checking roots of the Perl library directory tree via variable `\@INC'.\n" if $opt{'p'}; |