summaryrefslogtreecommitdiff
path: root/utils/perlivp.PL
diff options
context:
space:
mode:
authorDavid Golden <dagolden@cpan.org>2011-07-20 18:14:03 -0400
committerDavid Golden <dagolden@cpan.org>2011-07-20 18:14:03 -0400
commit50646f6f0beccf4783bfef8cb75375f49c727140 (patch)
tree4c578e9421ee19a308a3de2de0b8322f3c7ab5ac /utils/perlivp.PL
parent1889cb121b9e7ded9549eb33573d4b403a6e5f18 (diff)
downloadperl-50646f6f0beccf4783bfef8cb75375f49c727140.tar.gz
Make perlivp ignore PERL5LIB and current directory
Diffstat (limited to 'utils/perlivp.PL')
-rw-r--r--utils/perlivp.PL8
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'};