line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XT::Files::Plugin::Default; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
2859
|
use 5.006; |
|
6
|
|
|
|
|
19
|
|
4
|
6
|
|
|
6
|
|
39
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
126
|
|
5
|
6
|
|
|
6
|
|
26
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
269
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
8
|
|
|
|
|
|
|
|
9
|
6
|
|
|
6
|
|
2367
|
use parent 'XT::Files::Plugin'; |
|
6
|
|
|
|
|
1623
|
|
|
6
|
|
|
|
|
27
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub run { |
12
|
7
|
|
|
7
|
1
|
3472
|
my ( $self, $args ) = @_; |
13
|
|
|
|
|
|
|
|
14
|
7
|
|
|
|
|
13
|
my $dirs = 1; |
15
|
7
|
|
|
|
|
11
|
my $excludes = 1; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
ARG: |
18
|
7
|
|
|
|
|
10
|
for my $arg ( @{$args} ) { |
|
7
|
|
|
|
|
16
|
|
19
|
4
|
|
|
|
|
7
|
my ( $key, $value ) = @{$arg}; |
|
4
|
|
|
|
|
18
|
|
20
|
|
|
|
|
|
|
|
21
|
4
|
100
|
|
|
|
13
|
if ( $key eq 'dirs' ) { |
22
|
2
|
|
|
|
|
5
|
$dirs = !!$value; |
23
|
2
|
|
|
|
|
6
|
next ARG; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
2
|
100
|
|
|
|
5
|
if ( $key eq 'excludes' ) { |
27
|
1
|
|
|
|
|
2
|
$excludes = !!$value; |
28
|
1
|
|
|
|
|
3
|
next ARG; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
13
|
$self->log_fatal("Invalid configuration option '$key = $value' for plugin 'Default'"); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
6
|
|
|
|
|
109
|
my $xtf = $self->xtf; |
35
|
|
|
|
|
|
|
|
36
|
6
|
100
|
|
|
|
46
|
if ($excludes) { |
37
|
5
|
|
|
|
|
11
|
$xtf->plugin( 'Excludes', undef, [ map { [ 'exclude' => $_ ] } (qw([.]swp$ [.]bak$ ~$)) ] ); |
|
15
|
|
|
|
|
48
|
|
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
6
|
100
|
|
|
|
86
|
if ($dirs) { |
41
|
4
|
|
|
|
|
17
|
$xtf->plugin( |
42
|
|
|
|
|
|
|
'Dirs', undef, |
43
|
|
|
|
|
|
|
[ |
44
|
|
|
|
|
|
|
[ bin => 'bin' ], |
45
|
|
|
|
|
|
|
[ bin => 'script' ], |
46
|
|
|
|
|
|
|
[ module => 'lib' ], |
47
|
|
|
|
|
|
|
], |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
6
|
|
|
|
|
78
|
return; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |