line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
883
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Module::Install::CheckConflicts; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
13
|
use base 'Module::Install::Base'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
536
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
1
|
|
|
1
|
|
4
|
our $VERSION = '0.02'; |
10
|
1
|
|
|
|
|
237
|
our $ISCORE = 1; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub check_conflicts { |
14
|
0
|
|
|
0
|
1
|
|
my ($self, %conflicts) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my %conflicts_found; |
17
|
0
|
|
|
|
|
|
for my $mod (sort keys %conflicts) { |
18
|
0
|
0
|
|
|
|
|
next unless $self->can_use($mod); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $installed = $mod->VERSION; |
21
|
0
|
0
|
|
|
|
|
next unless $installed le $conflicts{$mod}; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
$conflicts_found{$mod} = $installed; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
0
|
|
|
|
|
return unless scalar keys %conflicts_found; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $dist = $self->name; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
print <<"EOM"; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
*** |
33
|
|
|
|
|
|
|
WARNING: |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This version of ${dist} conflicts with |
36
|
|
|
|
|
|
|
the version of some modules you have installed. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
You will need to upgrade these modules after |
39
|
|
|
|
|
|
|
installing this version of ${dist}. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
List of the conflicting modules and their installed |
42
|
|
|
|
|
|
|
versions: |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
EOM |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
for my $mod (sort keys %conflicts_found) { |
47
|
0
|
|
|
|
|
|
print sprintf(" %s : %s (<= %s)\n", |
48
|
|
|
|
|
|
|
$mod, $conflicts_found{$mod}, $conflicts{$mod}, |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
print "\n***\n"; |
53
|
|
|
|
|
|
|
|
54
|
0
|
0
|
|
|
|
|
return if $ENV{PERL_MM_USE_DEFAULT}; |
55
|
0
|
0
|
0
|
|
|
|
return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); |
|
|
|
0
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
sleep 4; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |