line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CLI::Driver::Deprecated; |
2
|
|
|
|
|
|
|
|
3
|
18
|
|
|
18
|
|
145
|
use Modern::Perl; |
|
18
|
|
|
|
|
42
|
|
|
18
|
|
|
|
|
247
|
|
4
|
18
|
|
|
18
|
|
3299
|
use Moose; |
|
18
|
|
|
|
|
57
|
|
|
18
|
|
|
|
|
159
|
|
5
|
18
|
|
|
18
|
|
129838
|
use namespace::autoclean; |
|
18
|
|
|
|
|
49
|
|
|
18
|
|
|
|
|
194
|
|
6
|
18
|
|
|
18
|
|
1608
|
use Kavorka '-all'; |
|
18
|
|
|
|
|
40
|
|
|
18
|
|
|
|
|
152
|
|
7
|
18
|
|
|
18
|
|
71920
|
use Data::Printer alias => 'pdump'; |
|
18
|
|
|
|
|
50
|
|
|
18
|
|
|
|
|
223
|
|
8
|
18
|
|
|
18
|
|
11331
|
use CLI::Driver::Option; |
|
18
|
|
|
|
|
94
|
|
|
18
|
|
|
|
|
1819
|
|
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
|
|
28941
|
method is_true { |
|
18
|
|
|
1
|
|
47
|
|
|
18
|
|
|
|
|
3602
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
34
|
|
|
|
|
|
|
|
35
|
1
|
50
|
|
|
|
26
|
if ($self->status) { |
36
|
1
|
|
|
|
|
6
|
return 1; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
0
|
return 0; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
18
|
50
|
33
|
18
|
|
45377
|
method parse (HashRef :$href!) { |
|
18
|
50
|
33
|
18
|
|
67
|
|
|
18
|
50
|
|
18
|
|
2491
|
|
|
18
|
50
|
|
18
|
|
143
|
|
|
18
|
50
|
|
18
|
|
43
|
|
|
18
|
50
|
|
17
|
|
1156
|
|
|
18
|
|
|
|
|
138
|
|
|
18
|
|
|
|
|
45
|
|
|
18
|
|
|
|
|
168
|
|
|
18
|
|
|
|
|
1944
|
|
|
18
|
|
|
|
|
41
|
|
|
18
|
|
|
|
|
7436
|
|
|
18
|
|
|
|
|
148
|
|
|
18
|
|
|
|
|
75
|
|
|
18
|
|
|
|
|
5028
|
|
|
17
|
|
|
|
|
91
|
|
|
17
|
|
|
|
|
66
|
|
|
17
|
|
|
|
|
63
|
|
|
17
|
|
|
|
|
117
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
45
|
|
|
17
|
|
|
|
|
56
|
|
|
17
|
|
|
|
|
97
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
75
|
|
|
17
|
|
|
|
|
54
|
|
|
17
|
|
|
|
|
87
|
|
|
17
|
|
|
|
|
111
|
|
|
17
|
|
|
|
|
43
|
|
|
17
|
|
|
|
|
125
|
|
|
17
|
|
|
|
|
160
|
|
|
17
|
|
|
|
|
86
|
|
|
17
|
|
|
|
|
98
|
|
|
17
|
|
|
|
|
48
|
|
|
17
|
|
|
|
|
117
|
|
|
17
|
|
|
|
|
68
|
|
43
|
|
|
|
|
|
|
|
44
|
17
|
50
|
|
|
|
102
|
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
|
|
|
|
|
69
|
my $status = $href->{status}; |
50
|
17
|
|
|
|
|
163
|
my $bool_status = $self->str_to_bool($status); |
51
|
17
|
|
|
|
|
658
|
$self->status($bool_status); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
17
|
50
|
|
|
|
82
|
if ( $href->{'replaced-by'} ) { |
55
|
17
|
|
|
|
|
614
|
$self->replaced_by( $href->{'replaced-by'} ); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
17
|
|
|
|
|
129
|
return 1; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
18
|
0
|
|
18
|
|
23505
|
method get_usage_modifier { |
|
18
|
|
|
0
|
|
74
|
|
|
18
|
|
|
|
|
4608
|
|
|
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; |