line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CLI::Driver::Deprecated; |
2
|
|
|
|
|
|
|
|
3
|
18
|
|
|
18
|
|
125
|
use Modern::Perl; |
|
18
|
|
|
|
|
39
|
|
|
18
|
|
|
|
|
207
|
|
4
|
18
|
|
|
18
|
|
2958
|
use Moose; |
|
18
|
|
|
|
|
37
|
|
|
18
|
|
|
|
|
136
|
|
5
|
18
|
|
|
18
|
|
113765
|
use namespace::autoclean; |
|
18
|
|
|
|
|
44
|
|
|
18
|
|
|
|
|
175
|
|
6
|
18
|
|
|
18
|
|
1439
|
use Kavorka '-all'; |
|
18
|
|
|
|
|
35
|
|
|
18
|
|
|
|
|
118
|
|
7
|
18
|
|
|
18
|
|
64961
|
use Data::Printer alias => 'pdump'; |
|
18
|
|
|
|
|
40
|
|
|
18
|
|
|
|
|
195
|
|
8
|
18
|
|
|
18
|
|
9875
|
use CLI::Driver::Option; |
|
18
|
|
|
|
|
97
|
|
|
18
|
|
|
|
|
1628
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with |
11
|
|
|
|
|
|
|
'CLI::Driver::CommonRole', |
12
|
|
|
|
|
|
|
'CLI::Driver::ArgParserRole'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
############################### |
15
|
|
|
|
|
|
|
###### PUBLIC ATTRIBUTES ###### |
16
|
|
|
|
|
|
|
############################### |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has status => ( |
19
|
|
|
|
|
|
|
is => 'rw', |
20
|
|
|
|
|
|
|
isa => 'Bool', |
21
|
|
|
|
|
|
|
default => 0, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has replaced_by => ( |
25
|
|
|
|
|
|
|
is => 'rw', |
26
|
|
|
|
|
|
|
isa => 'Str|Undef', |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
############################ |
30
|
|
|
|
|
|
|
###### PUBLIC METHODS ###### |
31
|
|
|
|
|
|
|
############################ |
32
|
|
|
|
|
|
|
|
33
|
18
|
50
|
|
18
|
|
25599
|
method is_true { |
|
18
|
|
|
1
|
|
48
|
|
|
18
|
|
|
|
|
3126
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
34
|
|
|
|
|
|
|
|
35
|
1
|
50
|
|
|
|
32
|
if ($self->status) { |
36
|
1
|
|
|
|
|
5
|
return 1; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
0
|
return 0; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
18
|
50
|
33
|
18
|
|
39832
|
method parse (HashRef :$href!) { |
|
18
|
50
|
33
|
18
|
|
53
|
|
|
18
|
50
|
|
18
|
|
2113
|
|
|
18
|
50
|
|
18
|
|
125
|
|
|
18
|
50
|
|
18
|
|
45
|
|
|
18
|
50
|
|
17
|
|
971
|
|
|
18
|
|
|
|
|
111
|
|
|
18
|
|
|
|
|
36
|
|
|
18
|
|
|
|
|
130
|
|
|
18
|
|
|
|
|
1818
|
|
|
18
|
|
|
|
|
41
|
|
|
18
|
|
|
|
|
6551
|
|
|
18
|
|
|
|
|
134
|
|
|
18
|
|
|
|
|
35
|
|
|
18
|
|
|
|
|
4401
|
|
|
17
|
|
|
|
|
92
|
|
|
17
|
|
|
|
|
48
|
|
|
17
|
|
|
|
|
60
|
|
|
17
|
|
|
|
|
124
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
45
|
|
|
17
|
|
|
|
|
49
|
|
|
17
|
|
|
|
|
144
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
100
|
|
|
17
|
|
|
|
|
57
|
|
|
17
|
|
|
|
|
80
|
|
|
17
|
|
|
|
|
69
|
|
|
17
|
|
|
|
|
51
|
|
|
17
|
|
|
|
|
76
|
|
|
17
|
|
|
|
|
158
|
|
|
17
|
|
|
|
|
85
|
|
|
17
|
|
|
|
|
77
|
|
|
17
|
|
|
|
|
34
|
|
|
17
|
|
|
|
|
92
|
|
|
17
|
|
|
|
|
43
|
|
43
|
|
|
|
|
|
|
|
44
|
17
|
50
|
|
|
|
77
|
if ( !defined $href->{status} ) { |
45
|
0
|
|
|
|
|
0
|
$self->warn("failed to find deprecated status"); |
46
|
0
|
|
|
|
|
0
|
return 0; # failed |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
else { |
49
|
17
|
|
|
|
|
59
|
my $status = $href->{status}; |
50
|
17
|
|
|
|
|
152
|
my $bool_status = $self->str_to_bool($status); |
51
|
17
|
|
|
|
|
614
|
$self->status($bool_status); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
17
|
50
|
|
|
|
84
|
if ( $href->{'replaced-by'} ) { |
55
|
17
|
|
|
|
|
541
|
$self->replaced_by( $href->{'replaced-by'} ); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
17
|
|
|
|
|
98
|
return 1; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
18
|
0
|
|
18
|
|
19981
|
method get_usage_modifier { |
|
18
|
|
|
0
|
|
58
|
|
|
18
|
|
|
|
|
3931
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
0
|
0
|
|
|
|
|
if ($self->status) { |
64
|
0
|
|
|
|
|
|
my $msg = 'DEPRECATED'; |
65
|
0
|
0
|
|
|
|
|
if ($self->replaced_by) { |
66
|
0
|
|
|
|
|
|
$msg.= " by " . $self->replaced_by; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
return $msg; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
return ''; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
######################################################## |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |