line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
1
|
|
|
1
|
|
5
|
package Module::CPANfile::Environment; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
3
|
1
|
|
|
1
|
|
571
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
6
|
use Module::CPANfile::Result; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
93
|
|
5
|
|
|
|
|
|
|
use Carp (); |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
my @bindings = qw( |
8
|
|
|
|
|
|
|
on requires recommends suggests conflicts |
9
|
|
|
|
|
|
|
feature |
10
|
|
|
|
|
|
|
osname |
11
|
|
|
|
|
|
|
configure_requires build_requires test_requires author_requires |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $file_id = 1; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
0
|
|
|
sub import { |
17
|
0
|
|
|
|
|
|
my($class, $result_ref) = @_; |
18
|
|
|
|
|
|
|
my $pkg = caller; |
19
|
0
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
$$result_ref = Module::CPANfile::Result->new; |
21
|
1
|
|
|
1
|
|
5
|
for my $binding (@bindings) { |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
267
|
|
22
|
0
|
|
|
0
|
|
|
no strict 'refs'; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
*{"$pkg\::$binding"} = sub { $$result_ref->$binding(@_) }; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
0
|
|
sub parse { |
28
|
|
|
|
|
|
|
my $file = shift; |
29
|
0
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
my $code = do { |
31
|
0
|
|
|
|
|
|
open my $fh, "<", $file or die "$file: $!"; |
32
|
|
|
|
|
|
|
join '', <$fh>; |
33
|
|
|
|
|
|
|
}; |
34
|
0
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my($res, $err); |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
{ |
|
0
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
local $@; |
39
|
|
|
|
|
|
|
$res = eval sprintf <
|
40
|
|
|
|
|
|
|
package Module::CPANfile::Sandbox%d; |
41
|
|
|
|
|
|
|
no warnings; |
42
|
|
|
|
|
|
|
my \$_result; |
43
|
|
|
|
|
|
|
BEGIN { import Module::CPANfile::Environment \\\$_result }; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# line 1 "$file" |
46
|
|
|
|
|
|
|
$code; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
\$_result; |
49
|
0
|
|
|
|
|
|
EVAL |
50
|
|
|
|
|
|
|
$err = $@; |
51
|
|
|
|
|
|
|
} |
52
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
if ($err) { die "Parsing $file failed: $err" }; |
54
|
0
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
return $res; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|