Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix _in_priv_or_arch for priv/site being the same dir #82

Merged
merged 1 commit into from
Jan 18, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions lib/CPAN/Module.pm
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,18 @@ sub uptodate {
# returns true if installed in privlib or archlib
sub _in_priv_or_arch {
my($self,$inst_file) = @_;
for my $confdirname (qw(archlibexp privlibexp)) {
my $confdir = $Config::Config{$confdirname};
if ($confdir eq substr($inst_file,0,length($confdir))) {
foreach my $pair (
[qw(sitearchexp archlibexp)],
[qw(sitelibexp privlibexp)]
) {
my ($site, $priv) = @Config::Config{@$pair};
if ($^O eq 'VMS') {
for my $d ($site, $priv) { $d = VMS::Filespec::unixify($d) };
}
s!/*$!!g foreach $site, $priv;
next if $site eq $priv;

if ($priv eq substr($inst_file,0,length($priv))) {
return 1;
}
}
Expand Down