line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::Version; |
2
|
|
|
|
|
|
|
$Git::Version::VERSION = '1.000'; |
3
|
2
|
|
|
2
|
|
25294
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
44
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
38
|
|
5
|
2
|
|
|
2
|
|
6
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
118
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
777
|
use Git::Version::Compare (); |
|
2
|
|
|
|
|
2326
|
|
|
2
|
|
|
|
|
138
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use overload |
10
|
60
|
|
|
60
|
|
2883
|
'""' => sub { ${ $_[0] } }, |
|
60
|
|
|
|
|
188
|
|
11
|
|
|
|
|
|
|
'cmp' => sub { |
12
|
18
|
|
|
18
|
|
1283
|
my ( $v1, $v2, $swap ) = @_; |
13
|
18
|
100
|
|
|
|
52
|
return $swap |
14
|
|
|
|
|
|
|
? Git::Version::Compare::cmp_git( $v2, $v1 ) |
15
|
|
|
|
|
|
|
: Git::Version::Compare::cmp_git( $v1, $v2 ); |
16
|
2
|
|
|
2
|
|
1735
|
}; |
|
2
|
|
|
|
|
1498
|
|
|
2
|
|
|
|
|
15
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
12
|
|
|
12
|
1
|
6130
|
my ( $class, $v ) = @_; |
20
|
12
|
100
|
|
|
|
31
|
croak "$v does not look like a Git version" |
21
|
|
|
|
|
|
|
if !Git::Version::Compare::looks_like_git($v); |
22
|
9
|
|
|
|
|
91
|
return bless \$v, $class; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |