line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
821
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
2
|
|
|
|
|
|
|
package Module::Build::InlineModule; |
3
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
18
|
use base 'Module::Build'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2553
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->add_property('inline'); |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
91564
|
use Inline::Module(); |
|
1
|
|
|
|
|
2300
|
|
|
1
|
|
|
|
|
255
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub ACTION_code { |
11
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
12
|
0
|
|
|
|
|
|
$self->SUPER::ACTION_code(@_); |
13
|
0
|
|
|
|
|
|
my $inline = $self->get_inline; |
14
|
0
|
|
|
|
|
|
my @inc = @INC; |
15
|
0
|
0
|
|
|
|
|
local @INC = ( |
16
|
|
|
|
|
|
|
(-e 'inc' ? ('inc') : ()), |
17
|
|
|
|
|
|
|
'lib', |
18
|
|
|
|
|
|
|
@inc, |
19
|
|
|
|
|
|
|
); |
20
|
0
|
|
|
|
|
|
for my $module (@{$inline->{module}}) { |
|
0
|
|
|
|
|
|
|
21
|
0
|
0
|
|
|
|
|
eval "require $module; 1" or die $@; |
22
|
|
|
|
|
|
|
} |
23
|
0
|
|
|
|
|
|
Inline::Module->handle_fixblib; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub ACTION_distdir { |
27
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
28
|
0
|
|
|
|
|
|
$self->SUPER::ACTION_distdir(@_); |
29
|
0
|
|
|
|
|
|
my $distdir = $self->dist_dir; |
30
|
0
|
|
|
|
|
|
my $inline = $self->get_inline; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my $inline_module = Inline::Module->new(%$inline); |
33
|
0
|
|
|
|
|
|
my $stub_modules = $inline->{stub}; |
34
|
0
|
|
|
|
|
|
my @included_modules = $inline_module->included_modules; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
Inline::Module->handle_distdir( |
37
|
|
|
|
|
|
|
$distdir, |
38
|
|
|
|
|
|
|
@$stub_modules, |
39
|
|
|
|
|
|
|
'--', |
40
|
|
|
|
|
|
|
@included_modules, |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# Replace this with call to Inline::Module |
45
|
|
|
|
|
|
|
sub get_inline { |
46
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
47
|
0
|
0
|
|
|
|
|
my $inline = $self->{properties}{inline} |
48
|
|
|
|
|
|
|
or die "Missing Module::Build property: 'inline'"; |
49
|
0
|
0
|
|
|
|
|
$inline->{module} or die |
50
|
|
|
|
|
|
|
"Module::Build::InlineModule property 'inline' missing key 'module'"; |
51
|
0
|
0
|
|
|
|
|
$inline->{module} = [$inline->{module}] unless ref $inline->{module}; |
52
|
0
|
|
0
|
|
|
|
$inline->{stub} ||= [ map "${_}::Inline", @{$inline->{module}} ]; |
|
0
|
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
$inline->{stub} = [$inline->{stub}] unless ref $inline->{stub}; |
54
|
0
|
|
0
|
|
|
|
$inline->{ilsm} ||= 'Inline::C'; |
55
|
0
|
0
|
|
|
|
|
$inline->{ilsm} = [$inline->{ilsm}] unless ref $inline->{ilsm}; |
56
|
0
|
|
|
|
|
|
return $inline; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |