line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: Determine the responsible for tests via Changes file for upload to elasticsearch |
2
|
|
|
|
|
|
|
# PODNAME: App::Prove::Elasticsearch::Blamer::Default |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package App::Prove::Elasticsearch::Blamer::Default; |
5
|
|
|
|
|
|
|
$App::Prove::Elasticsearch::Blamer::Default::VERSION = '0.001'; |
6
|
2
|
|
|
2
|
|
75314
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
43
|
|
7
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
36
|
|
8
|
2
|
|
|
2
|
|
870
|
use utf8; |
|
2
|
|
|
|
|
21
|
|
|
2
|
|
|
|
|
8
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
53
|
use File::Basename qw{dirname}; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
121
|
|
11
|
2
|
|
|
2
|
|
11
|
use Cwd qw{abs_path}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
469
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $party = {}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub get_responsible_party { |
16
|
4
|
|
|
4
|
1
|
3278
|
my $loc = abs_path(dirname(shift) . "/../Changes"); |
17
|
|
|
|
|
|
|
|
18
|
4
|
100
|
|
|
|
49
|
return $party->{$loc} if $party->{$loc}; |
19
|
3
|
|
|
|
|
6
|
my $ret; |
20
|
3
|
100
|
|
|
|
96
|
open(my $fh, '<', $loc) or die "Could not open $loc"; |
21
|
2
|
|
|
|
|
22
|
while (<$fh>) { |
22
|
3
|
|
|
|
|
40
|
($ret) = $_ =~ m/\s*\w*\s*(\w*)$/; |
23
|
3
|
100
|
|
|
|
12
|
last if $ret; |
24
|
|
|
|
|
|
|
} |
25
|
2
|
|
|
|
|
17
|
close $fh; |
26
|
2
|
100
|
|
|
|
13
|
die 'Could not determine the latest version from Changes!' unless $ret; |
27
|
1
|
|
|
|
|
3
|
$party->{$loc} = $ret; |
28
|
1
|
|
|
|
|
8
|
return $ret; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |