line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tak::ModuleSender; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1118
|
use IO::All; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
4
|
1
|
|
|
1
|
|
60
|
use List::Util qw(first); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
55
|
|
5
|
1
|
|
|
1
|
|
5
|
use Config; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
6
|
1
|
|
|
1
|
|
5
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Tak::Role::Service'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has dir_list => (is => 'lazy'); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _build_dir_list { |
13
|
0
|
|
|
0
|
|
|
my %core = map +($_ => 1), @Config{qw(privlibexp archlibexp)}; |
14
|
0
|
|
|
|
|
|
[ map io->dir($_), grep !/$Config{archname}$/, grep !$core{$_}, @INC ]; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub handle_source_for { |
18
|
0
|
|
|
0
|
0
|
|
my ($self, $module) = @_; |
19
|
0
|
|
|
0
|
|
|
my $io = first { $_->exists } map $_->catfile($module), @{$self->dir_list}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
unless ($io) { |
21
|
0
|
|
|
|
|
|
die [ 'failure' ]; |
22
|
|
|
|
|
|
|
} |
23
|
0
|
|
|
|
|
|
my $code = $io->all; |
24
|
0
|
|
|
|
|
|
return $code; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |