line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
15962
|
use 5.006; # our |
|
3
|
|
|
|
|
8
|
|
2
|
3
|
|
|
3
|
|
11
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
54
|
|
3
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
179
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package MetaPOD::Role::Format; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = 'v0.4.0'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Base role for common format routines |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
392
|
use Moo::Role qw( requires ); |
|
3
|
|
|
|
|
12899
|
|
|
3
|
|
|
|
|
17
|
|
14
|
3
|
|
|
3
|
|
762
|
use Carp qw( croak ); |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
149
|
|
15
|
3
|
|
|
3
|
|
1149
|
use version 0.77; |
|
3
|
|
|
|
|
4396
|
|
|
3
|
|
|
|
|
17
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
10
|
|
|
10
|
1
|
274
|
sub supported_versions { return qw( v1.0.0 ) } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub _supported_versions { |
55
|
0
|
|
|
0
|
|
0
|
my $class = shift; |
56
|
0
|
|
|
|
|
0
|
return map { version->parse($_) } $class->supported_versions; |
|
0
|
|
|
|
|
0
|
|
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub supports_version { |
72
|
13
|
|
|
13
|
1
|
13223
|
my ( $class, $version ) = @_; |
73
|
13
|
100
|
|
|
|
24
|
return [ $class->supported_versions ]->[-1] if not defined $version; |
74
|
12
|
50
|
|
|
|
36
|
if ( $version !~ /^v/msx ) { |
75
|
0
|
|
|
|
|
0
|
croak q{Version specification does not begin with a 'v'}; |
76
|
|
|
|
|
|
|
} |
77
|
12
|
|
|
|
|
52
|
my $v = version->parse($version); |
78
|
12
|
|
|
|
|
18
|
for my $supported ( $class->supported_versions ) { |
79
|
17
|
100
|
|
|
|
121
|
return $supported if $supported == $v; |
80
|
|
|
|
|
|
|
} |
81
|
6
|
|
|
|
|
22
|
croak "Version $v not supported. Supported versions: " . join q{,}, $class->supported_versions; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
requires 'add_segment'; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1; |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
__END__ |