line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
6
|
|
|
6
|
|
480
|
use 5.006; # our |
|
6
|
|
|
|
|
14
|
|
2
|
6
|
|
|
6
|
|
23
|
use strict; |
|
6
|
|
|
|
|
92
|
|
|
6
|
|
|
|
|
111
|
|
3
|
6
|
|
|
6
|
|
17
|
use warnings; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
355
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Git::Wrapper::Plus::Support::Range; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.004011'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: A record describing a range of supported versions |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
6
|
|
|
6
|
|
524
|
use Moo qw( has ); |
|
6
|
|
|
|
|
11440
|
|
|
6
|
|
|
|
|
28
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
our @CARP_NOT; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
has 'min' => ( is => ro =>, predicate => 'has_min' ); |
62
|
|
|
|
|
|
|
has 'max' => ( is => ro =>, predicate => 'has_max' ); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
has 'min_tag' => ( is => ro =>, predicate => 'has_min_tag' ); |
65
|
|
|
|
|
|
|
has 'max_tag' => ( is => ro =>, predicate => 'has_max_tag' ); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
has 'min_sha1' => ( is => ro =>, predicate => 'has_min_sha1' ); |
68
|
|
|
|
|
|
|
has 'max_sha1' => ( is => ro =>, predicate => 'has_max_sha1' ); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub BUILD { |
76
|
118
|
|
|
118
|
0
|
7014
|
my ($self) = @_; |
77
|
118
|
50
|
33
|
|
|
785
|
if ( not $self->min and not $self->max ) { |
78
|
0
|
|
|
|
|
0
|
require Carp; |
79
|
|
|
|
|
|
|
## no critic (Variables::ProhibitLocalVars) |
80
|
0
|
|
|
|
|
0
|
local (@CARP_NOT) = ('Git::Wrapper::Plus::Support::Range'); |
81
|
0
|
|
|
|
|
0
|
Carp::croak('Invalid range, must specify either min or max, or both'); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub supports_version { |
99
|
35
|
|
|
35
|
1
|
124
|
my ( $self, $versions_object ) = @_; |
100
|
35
|
100
|
66
|
|
|
548
|
if ( $self->has_min and not $self->has_max ) { |
101
|
34
|
50
|
|
|
|
188
|
return 1 if $versions_object->newer_than( $self->min ); |
102
|
0
|
|
|
|
|
0
|
return; |
103
|
|
|
|
|
|
|
} |
104
|
1
|
50
|
33
|
|
|
17
|
if ( $self->has_max and not $self->has_min ) { |
105
|
0
|
0
|
|
|
|
0
|
return 1 if $versions_object->older_than( $self->max ); |
106
|
0
|
|
|
|
|
0
|
return; |
107
|
|
|
|
|
|
|
} |
108
|
1
|
50
|
|
|
|
9
|
return unless $versions_object->newer_than( $self->min ); |
109
|
1
|
50
|
|
|
|
4155
|
return unless $versions_object->older_than( $self->max ); |
110
|
0
|
|
|
|
|
|
return 1; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
6
|
|
|
6
|
|
3617
|
no Moo; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
20
|
|
114
|
|
|
|
|
|
|
1; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
__END__ |