line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::FileGatherer; |
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
7
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
5
|
1
|
|
|
1
|
|
20
|
use File::pushd; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
6
|
1
|
|
|
1
|
|
5
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
7
|
1
|
|
|
1
|
|
546
|
use ExtUtils::Manifest 1.54 qw(maniskip); |
|
1
|
|
|
|
|
5855
|
|
|
1
|
|
|
|
|
67
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
7
|
use Minilla::Git; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
81
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
9
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has exclude_match => ( |
14
|
|
|
|
|
|
|
is => 'ro', |
15
|
|
|
|
|
|
|
default => sub { +[ ] }, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has include_dotfiles => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
default => sub { undef }, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
445
|
no Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub gather_files { |
26
|
0
|
|
|
0
|
0
|
|
my ($self, $root) = @_; |
27
|
0
|
|
|
|
|
|
my $guard = pushd($root); |
28
|
0
|
|
|
|
|
|
my @files = grep { _topdir($_) ne 'extlib' } |
29
|
0
|
|
|
|
|
|
grep { not -l $_ } |
30
|
0
|
|
|
|
|
|
map { File::Spec->abs2rel($_, $root) } |
|
0
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
git_ls_files(), git_submodule_files(); |
32
|
0
|
0
|
|
|
|
|
if ($self->exclude_match) { |
33
|
0
|
0
|
|
|
|
|
for my $pattern (@{$self->exclude_match || []}) { |
|
0
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
@files = grep { _normalize($_) !~ $pattern } @files; |
|
0
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
0
|
|
|
|
|
if (-f 'MANIFEST.SKIP') { |
39
|
0
|
|
|
|
|
|
my $skip = maniskip('MANIFEST.SKIP') ; |
40
|
0
|
|
|
|
|
|
@files = grep { !$skip->($_) } @files; |
|
0
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
} |
42
|
0
|
0
|
|
|
|
|
unless ($self->include_dotfiles) { |
43
|
|
|
|
|
|
|
@files = grep { |
44
|
0
|
|
|
|
|
|
!(grep { $_ =~ qr/^\./ } split m!/!, _normalize($_)) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
} @files; |
46
|
|
|
|
|
|
|
} |
47
|
0
|
0
|
|
|
|
|
if ($^O eq 'MSWin32') { |
48
|
|
|
|
|
|
|
@files = map { |
49
|
0
|
|
|
|
|
|
my $x = $_; |
|
0
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
$x =~ s!\\!/!g; |
51
|
0
|
|
|
|
|
|
$x; |
52
|
|
|
|
|
|
|
} @files; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my @submodules = git_submodules; |
56
|
0
|
0
|
|
|
|
|
if (@submodules) { |
57
|
0
|
|
|
|
|
|
for my $filename (@submodules) { |
58
|
0
|
|
|
|
|
|
@files = grep { $_ ne $filename } @files; |
|
0
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
return @files; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub _topdir { |
66
|
0
|
|
|
0
|
|
|
my ($path) = @_; |
67
|
0
|
0
|
|
|
|
|
[File::Spec->splitdir($path)]->[0] || ''; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
# for Windows |
71
|
|
|
|
|
|
|
sub _normalize { |
72
|
0
|
|
|
0
|
|
|
local $_ = shift; |
73
|
0
|
|
|
|
|
|
s!\\!/!g; |
74
|
0
|
|
|
|
|
|
$_; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1; |