| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Alien::git; |
|
2
|
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
441066
|
use strict; |
|
|
4
|
|
|
|
|
14
|
|
|
|
4
|
|
|
|
|
101
|
|
|
4
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
75
|
|
|
5
|
4
|
|
|
4
|
|
65
|
use 5.008001; |
|
|
4
|
|
|
|
|
12
|
|
|
6
|
4
|
|
|
4
|
|
441
|
use Capture::Tiny qw( capture ); |
|
|
4
|
|
|
|
|
20208
|
|
|
|
4
|
|
|
|
|
202
|
|
|
7
|
4
|
|
|
4
|
|
777
|
use File::Which qw( which ); |
|
|
4
|
|
|
|
|
1686
|
|
|
|
4
|
|
|
|
|
988
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Find system git |
|
10
|
|
|
|
|
|
|
our $VERSION = '0.10'; # VERSION |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
0
|
|
|
0
|
0
|
0
|
sub cflags {''} |
|
14
|
0
|
|
|
0
|
0
|
0
|
sub libs {''} |
|
15
|
|
|
|
0
|
0
|
|
sub dynamic_libs {} |
|
16
|
1
|
|
|
1
|
0
|
15
|
sub install_type { 'system' } |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# IF you are reading the documentation and wondering |
|
19
|
|
|
|
|
|
|
# why it says that you need to add bin_dir to your |
|
20
|
|
|
|
|
|
|
# PATH, and you are looking at the source here and seeing |
|
21
|
|
|
|
|
|
|
# that it just returns an empty list, and wondering |
|
22
|
|
|
|
|
|
|
# why? It is because in the future Alien::git MAY |
|
23
|
|
|
|
|
|
|
# support share installs, at which point your code will |
|
24
|
|
|
|
|
|
|
# break if you are NOT adding bin_dir to your PATH. |
|
25
|
3
|
|
|
3
|
1
|
78290
|
sub bin_dir {()} |
|
26
|
|
|
|
|
|
|
|
|
27
|
13
|
|
50
|
13
|
0
|
286791
|
sub exe { scalar which $ENV{ALIEN_GIT} || 'git' } |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub version |
|
30
|
|
|
|
|
|
|
{ |
|
31
|
|
|
|
|
|
|
my($out) = capture { |
|
32
|
4
|
|
|
4
|
|
4765
|
system( |
|
33
|
|
|
|
|
|
|
__PACKAGE__->exe, |
|
34
|
|
|
|
|
|
|
'--version', |
|
35
|
|
|
|
|
|
|
); |
|
36
|
4
|
|
|
4
|
0
|
16105
|
}; |
|
37
|
|
|
|
|
|
|
|
|
38
|
4
|
50
|
|
|
|
35398
|
$out =~ /git version ([0-9\.]+)/ |
|
39
|
|
|
|
|
|
|
? $1 |
|
40
|
|
|
|
|
|
|
: 'unknown'; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub alien_helper |
|
44
|
|
|
|
|
|
|
{ |
|
45
|
|
|
|
|
|
|
return { |
|
46
|
4
|
|
|
4
|
|
1547
|
git => sub { __PACKAGE__->exe }, |
|
47
|
|
|
|
|
|
|
} |
|
48
|
3
|
|
|
3
|
0
|
24671
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |