line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
1
|
|
|
1
|
|
682
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
5
|
|
|
|
|
|
|
use Pod::Checker; |
6
|
1
|
|
|
1
|
|
5
|
use Specio::Library::Numeric; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
135
|
|
7
|
1
|
|
|
1
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
8
|
|
|
|
|
|
|
use Moo; |
9
|
1
|
|
|
1
|
|
7519
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
10
|
|
|
|
|
|
|
extends 'Code::TidyAll::Plugin'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.81'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has warnings => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
isa => t('PositiveInt'), |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my ( $self, $file ) = @_; |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
6
|
1
|
22
|
my $result; |
22
|
|
|
|
|
|
|
my %options = ( $self->warnings ? ( '-warnings' => $self->warnings ) : () ); |
23
|
6
|
|
|
|
|
15
|
my $checker = Pod::Checker->new(%options); |
24
|
6
|
100
|
|
|
|
54
|
my $output; |
25
|
6
|
|
|
|
|
103
|
open my $fh, '>', \$output; |
26
|
6
|
|
|
|
|
991
|
$checker->parse_from_file( $file->stringify, $fh ); |
27
|
1
|
|
|
1
|
|
11
|
die $output |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
148
|
|
28
|
6
|
|
|
|
|
1062
|
if $checker->num_errors > 0 |
29
|
6
|
100
|
100
|
|
|
7689
|
|| ( $self->warnings && $checker->num_warnings > 0 ); |
|
|
|
100
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# ABSTRACT: Use podchecker with tidyall |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=encoding UTF-8 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Code::TidyAll::Plugin::PodChecker - Use podchecker with tidyall |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
version 0.81 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SYNOPSIS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
In configuration: |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
; Check for errors, but ignore warnings |
54
|
|
|
|
|
|
|
; |
55
|
|
|
|
|
|
|
[PodChecker] |
56
|
|
|
|
|
|
|
select = lib/**/*.{pm,pod} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
; Die on level 1 warnings (can also be set to 2) |
59
|
|
|
|
|
|
|
; |
60
|
|
|
|
|
|
|
[PodChecker] |
61
|
|
|
|
|
|
|
select = lib/**/*.{pm,pod} |
62
|
|
|
|
|
|
|
warnings = 1 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Runs L<podchecker>, a POD validator, and dies if any problems were found. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 INSTALLATION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Install podchecker from CPAN. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
cpanm podchecker |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 CONFIGURATION |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This plugin accepts the following configuration options: |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 warnings |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The level of warnings to consider as errors - 1 or 2. By default, warnings will |
81
|
|
|
|
|
|
|
be ignored. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 SUPPORT |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Bugs may be submitted at L<https://github.com/houseabsolute/perl-code-tidyall/issues>. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 SOURCE |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
The source code repository for Code-TidyAll can be found at L<https://github.com/houseabsolute/perl-code-tidyall>. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 AUTHORS |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=over 4 |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item * |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Jonathan Swartz <swartz@pobox.com> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item * |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=back |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
This software is copyright (c) 2011 - 2022 by Jonathan Swartz. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
110
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
The full text of the license can be found in the |
113
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |