| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package YA::CLI::PodRole; |
|
2
|
|
|
|
|
|
|
our $VERSION = '0.007'; |
|
3
|
7
|
|
|
7
|
|
234252
|
use Moo::Role; |
|
|
7
|
|
|
|
|
14685
|
|
|
|
7
|
|
|
|
|
51
|
|
|
4
|
7
|
|
|
7
|
|
6411
|
use namespace::autoclean; |
|
|
7
|
|
|
|
|
92777
|
|
|
|
7
|
|
|
|
|
41
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Pod handler role |
|
7
|
|
|
|
|
|
|
|
|
8
|
7
|
|
|
7
|
|
3094
|
use YA::CLI::Usage; |
|
|
7
|
|
|
|
|
6567
|
|
|
|
7
|
|
|
|
|
1861
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
1
|
2
|
sub usage_pod { 0 } |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub as_help { |
|
13
|
8
|
|
|
8
|
1
|
26
|
my $self = shift; |
|
14
|
8
|
|
|
|
|
10
|
my $rc = shift; |
|
15
|
8
|
|
|
|
|
41
|
my $message = shift; |
|
16
|
|
|
|
|
|
|
|
|
17
|
8
|
100
|
100
|
|
|
48
|
return YA::CLI::Usage->new( |
|
18
|
|
|
|
|
|
|
rc => ($rc // 0), |
|
19
|
|
|
|
|
|
|
$message ? (message => $message) : (), |
|
20
|
|
|
|
|
|
|
$self->_get_podfile_for_usage, |
|
21
|
|
|
|
|
|
|
); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub as_manpage { |
|
25
|
2
|
|
|
2
|
0
|
5
|
my $self = shift; |
|
26
|
|
|
|
|
|
|
|
|
27
|
2
|
|
|
|
|
7
|
return YA::CLI::Usage->new( |
|
28
|
|
|
|
|
|
|
rc => 0, |
|
29
|
|
|
|
|
|
|
verbose => 2, |
|
30
|
|
|
|
|
|
|
$self->_get_podfile_for_usage, |
|
31
|
|
|
|
|
|
|
); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _get_podfile_for_usage { |
|
35
|
10
|
|
|
10
|
|
17
|
my $self = shift; |
|
36
|
|
|
|
|
|
|
|
|
37
|
10
|
|
|
|
|
13
|
my $podfile; |
|
38
|
10
|
|
|
|
|
22
|
my $pod = $self->usage_pod; |
|
39
|
10
|
100
|
|
|
|
208
|
return unless $pod; |
|
40
|
2
|
50
|
|
|
|
8
|
return if $pod eq 'pl'; |
|
41
|
2
|
50
|
|
|
|
7
|
return (pod_file => $pod) unless $pod == 1; |
|
42
|
2
|
|
33
|
|
|
51
|
return (pod_file => ref $self || $self); |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |