line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CLI::Driver::Deprecated; |
2
|
|
|
|
|
|
|
|
3
|
18
|
|
|
18
|
|
142
|
use Modern::Perl; |
|
18
|
|
|
|
|
41
|
|
|
18
|
|
|
|
|
200
|
|
4
|
18
|
|
|
18
|
|
3193
|
use Moose; |
|
18
|
|
|
|
|
44
|
|
|
18
|
|
|
|
|
158
|
|
5
|
18
|
|
|
18
|
|
126763
|
use namespace::autoclean; |
|
18
|
|
|
|
|
45
|
|
|
18
|
|
|
|
|
212
|
|
6
|
18
|
|
|
18
|
|
1675
|
use Kavorka '-all'; |
|
18
|
|
|
|
|
44
|
|
|
18
|
|
|
|
|
148
|
|
7
|
18
|
|
|
18
|
|
71519
|
use Data::Printer alias => 'pdump'; |
|
18
|
|
|
|
|
57
|
|
|
18
|
|
|
|
|
265
|
|
8
|
18
|
|
|
18
|
|
11261
|
use CLI::Driver::Option; |
|
18
|
|
|
|
|
86
|
|
|
18
|
|
|
|
|
1651
|
|
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
|
|
27152
|
method is_true { |
|
18
|
|
|
1
|
|
48
|
|
|
18
|
|
|
|
|
3328
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
3
|
|
34
|
|
|
|
|
|
|
|
35
|
1
|
50
|
|
|
|
30
|
if ($self->status) { |
36
|
1
|
|
|
|
|
7
|
return 1; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
0
|
return 0; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
18
|
50
|
33
|
18
|
|
44653
|
method parse (HashRef :$href!) { |
|
18
|
50
|
33
|
18
|
|
70
|
|
|
18
|
50
|
|
18
|
|
2415
|
|
|
18
|
50
|
|
18
|
|
134
|
|
|
18
|
50
|
|
18
|
|
43
|
|
|
18
|
50
|
|
17
|
|
1057
|
|
|
18
|
|
|
|
|
121
|
|
|
18
|
|
|
|
|
50
|
|
|
18
|
|
|
|
|
148
|
|
|
18
|
|
|
|
|
1839
|
|
|
18
|
|
|
|
|
60
|
|
|
18
|
|
|
|
|
7060
|
|
|
18
|
|
|
|
|
219
|
|
|
18
|
|
|
|
|
47
|
|
|
18
|
|
|
|
|
5248
|
|
|
17
|
|
|
|
|
158
|
|
|
17
|
|
|
|
|
89
|
|
|
17
|
|
|
|
|
57
|
|
|
17
|
|
|
|
|
132
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
49
|
|
|
17
|
|
|
|
|
57
|
|
|
17
|
|
|
|
|
112
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
136
|
|
|
17
|
|
|
|
|
63
|
|
|
17
|
|
|
|
|
89
|
|
|
17
|
|
|
|
|
93
|
|
|
17
|
|
|
|
|
47
|
|
|
17
|
|
|
|
|
97
|
|
|
17
|
|
|
|
|
145
|
|
|
17
|
|
|
|
|
96
|
|
|
17
|
|
|
|
|
93
|
|
|
17
|
|
|
|
|
38
|
|
|
17
|
|
|
|
|
71
|
|
|
17
|
|
|
|
|
62
|
|
43
|
|
|
|
|
|
|
|
44
|
17
|
50
|
|
|
|
80
|
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
|
|
|
|
|
62
|
my $status = $href->{status}; |
50
|
17
|
|
|
|
|
161
|
my $bool_status = $self->str_to_bool($status); |
51
|
17
|
|
|
|
|
651
|
$self->status($bool_status); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
17
|
50
|
|
|
|
79
|
if ( $href->{'replaced-by'} ) { |
55
|
17
|
|
|
|
|
609
|
$self->replaced_by( $href->{'replaced-by'} ); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
17
|
|
|
|
|
95
|
return 1; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
18
|
0
|
|
18
|
|
22736
|
method get_usage_modifier { |
|
18
|
|
|
0
|
|
66
|
|
|
18
|
|
|
|
|
4440
|
|
|
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; |