line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::LatestPrereqs::MakeMaker;
|
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1324
|
use strict;
|
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
289
|
|
4
|
3
|
|
|
3
|
|
17
|
use warnings;
|
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
98
|
|
5
|
3
|
|
|
3
|
|
18
|
use Carp;
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
276
|
|
6
|
3
|
|
|
3
|
|
5689
|
use ExtUtils::MakeMaker ();
|
|
3
|
|
|
|
|
376625
|
|
|
3
|
|
|
|
|
407
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub parse {
|
9
|
2
|
|
|
2
|
1
|
5
|
my ($class, $file) = @_;
|
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
|
|
3
|
my @requires;
|
12
|
|
|
|
|
|
|
my $WriteMakefile = sub {
|
13
|
2
|
|
|
2
|
|
336
|
my %args = @_;
|
14
|
2
|
|
50
|
|
|
14
|
my $prereqs = $args{PREREQ_PM} || {};
|
15
|
2
|
|
|
|
|
5
|
foreach my $key (keys %{ $prereqs }) {
|
|
2
|
|
|
|
|
10
|
|
16
|
9
|
|
100
|
|
|
61
|
push @requires, [ $key, $prereqs->{$key} || 0 ];
|
17
|
|
|
|
|
|
|
}
|
18
|
2
|
|
|
|
|
86
|
bless \%args, 'Test::LatestPrereqs::MakeMaker::Fake';
|
19
|
2
|
|
|
|
|
11
|
};
|
20
|
|
|
|
|
|
|
|
21
|
3
|
|
|
3
|
|
26
|
no warnings 'redefine';
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
361
|
|
22
|
2
|
|
|
|
|
5
|
local *main::WriteMakefile = $WriteMakefile;
|
23
|
2
|
|
|
|
|
4
|
local *ExtUtils::MakeMaker::WriteMakefile = $WriteMakefile;
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# mock Inline::MakeMaker, too
|
26
|
2
|
|
|
|
|
7
|
local $INC{'Inline/MakeMaker.pm'} = 1;
|
27
|
2
|
|
|
|
|
4
|
local @Inline::MakeMaker::EXPORT = qw( WriteMakefile WriteInlineMakefile );
|
28
|
2
|
|
|
|
|
51
|
local @Inline::MakeMaker::ISA = 'Exporter';
|
29
|
2
|
|
|
|
|
10
|
local *Inline::MakeMaker::WriteMakefile = $WriteMakefile;
|
30
|
2
|
|
|
|
|
5
|
local *Inline::MakeMaker::WriteInlineMakefile = $WriteMakefile;
|
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
|
|
4
|
eval {
|
33
|
|
|
|
|
|
|
package main;
|
34
|
3
|
|
|
3
|
|
15
|
no strict;
|
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
81
|
|
35
|
3
|
|
|
3
|
|
11
|
no warnings;
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
533
|
|
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
0
|
|
8
|
local *CORE::GLOBAL::exit = sub {};
|
|
0
|
|
|
|
|
0
|
|
38
|
|
|
|
|
|
|
|
39
|
2
|
|
|
|
|
1082
|
require "$file";
|
40
|
|
|
|
|
|
|
};
|
41
|
2
|
|
|
|
|
30
|
delete $INC{$file};
|
42
|
|
|
|
|
|
|
|
43
|
2
|
50
|
33
|
|
|
12
|
if ($@ && $@ !~ /did not return a true value/) {
|
44
|
0
|
|
|
|
|
0
|
croak "Makefile.PL error: $@";
|
45
|
|
|
|
|
|
|
}
|
46
|
|
|
|
|
|
|
|
47
|
2
|
|
|
|
|
95
|
return @requires;
|
48
|
|
|
|
|
|
|
}
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
package #
|
51
|
|
|
|
|
|
|
Test::LatestPrereqs::MakeMaker::Fake;
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1;
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__
|