File Coverage

blib/lib/Dist/Zilla/Plugin/Author/HAYOBAAN/LinkCheck.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Dist::Zilla::Plugin::Author::HAYOBAAN::LinkCheck;
2 1     1   8 use strict;
  1         4  
  1         42  
3 1     1   8 use warnings;
  1         2  
  1         57  
4              
5             # ABSTRACT: Adapted version of the Dist::Zilla::Plugin::Test::Pod::LinkCheck
6             # plugin to set the cpan backend to CPAN instead of the deprecated CPANPLUS.
7             our $VERSION = '0.014'; # VERSION
8              
9 1     1   8 use Moose;
  1         2  
  1         11  
10             extends 'Dist::Zilla::Plugin::InlineFiles';
11             with 'Dist::Zilla::Role::PrereqSource';
12              
13             sub register_prereqs {
14 1     1 0 1076390 my $self = shift;
15              
16 1         39 return $self->zilla->register_prereqs(
17             { type => 'requires',
18             phase => 'develop', },
19             'Test::Pod::LinkCheck' => '0',
20             );
21             }
22              
23             #pod =pod
24             #pod
25             #pod =encoding UTF-8
26             #pod
27             #pod =for :stopwords Randy Stauner ACKNOWLEDGEMENTS cpan testmatrix url annocpan anno bugtracker
28             #pod rt cpants kwalitee diff irc mailto metadata placeholders metacpan
29             #pod
30             #pod =head1 NAME
31             #pod
32             #pod Dist::Zilla::Plugin::Author::HAYOBAAN::LinkCheck - Add author tests for POD links
33             #pod
34             #pod =head1 USAGE
35             #pod
36             #pod Add the following to your F<dist.ini>:
37             #pod
38             #pod [Author::HAYOBAAN::LinkCheck]
39             #pod
40             #pod =head1 SEE ALSO
41             #pod
42             #pod =for :list
43             #pod * The original L<Test::Pod::LinkCheck|Dist::Zilla::Plugin::Test::Pod::LinkCheck> plugin
44             #pod
45             #pod * The underlying test L<Test::Pod::LinkCheck>
46             #pod
47             #pod =cut
48              
49             #pod =for Pod::Coverage register_prereqs
50             #pod
51             #pod =head1 AUTHOR
52             #pod
53             #pod Randy Stauner <rwstauner@cpan.org>, modifications by Hayo Baan.
54             #pod
55             #pod =head1 COPYRIGHT AND LICENSE
56             #pod
57             #pod This software is copyright (c) 2011 by Randy Stauner.
58             #pod
59             #pod This is free software; you can redistribute it and/or modify it under
60             #pod the same terms as the Perl 5 programming language system itself.
61             #pod
62             #pod =cut
63              
64             __PACKAGE__->meta->make_immutable;
65 1     1   7773 no Moose;
  1         4  
  1         6  
66              
67             1;
68              
69             =pod
70              
71             =encoding UTF-8
72              
73             =head1 NAME
74              
75             Dist::Zilla::Plugin::Author::HAYOBAAN::LinkCheck - Adapted version of the Dist::Zilla::Plugin::Test::Pod::LinkCheck
76              
77             =head1 VERSION
78              
79             version 0.014
80              
81             =head1 USAGE
82              
83             Add the following to your F<dist.ini>:
84              
85             [Author::HAYOBAAN::LinkCheck]
86              
87             =for :stopwords Randy Stauner ACKNOWLEDGEMENTS cpan testmatrix url annocpan anno bugtracker
88             rt cpants kwalitee diff irc mailto metadata placeholders metacpan
89              
90             =head1 NAME
91              
92             Dist::Zilla::Plugin::Author::HAYOBAAN::LinkCheck - Add author tests for POD links
93              
94             =for Pod::Coverage register_prereqs
95              
96             =head1 AUTHOR
97              
98             Randy Stauner <rwstauner@cpan.org>, modifications by Hayo Baan.
99              
100             =head1 COPYRIGHT AND LICENSE
101              
102             This software is copyright (c) 2011 by Randy Stauner.
103              
104             This is free software; you can redistribute it and/or modify it under
105             the same terms as the Perl 5 programming language system itself.
106              
107             =head1 BUGS
108              
109             Please report any bugs or feature requests on the bugtracker
110             L<website|https://github.com/HayoBaan/Dist-Zilla-PluginBundle-Author-HAYOBAAN/issues>.
111              
112             When submitting a bug or request, please include a test-file or a
113             patch to an existing test-file that illustrates the bug or desired
114             feature.
115              
116             =head1 SEE ALSO
117              
118             =over 4
119              
120             =item *
121              
122             The original L<Test::Pod::LinkCheck|Dist::Zilla::Plugin::Test::Pod::LinkCheck> plugin
123              
124             =back
125              
126             * The underlying test L<Test::Pod::LinkCheck>
127              
128             =head1 AUTHOR
129              
130             Hayo Baan <info@hayobaan.com>
131              
132             =head1 COPYRIGHT AND LICENSE
133              
134             This software is copyright (c) 2014 by Hayo Baan.
135              
136             This is free software; you can redistribute it and/or modify it under
137             the same terms as the Perl 5 programming language system itself.
138              
139             =cut
140              
141             __DATA__
142             ___[ xt/author/pod-linkcheck.t ]___
143             #!perl
144              
145             use strict;
146             use warnings;
147             use Test::More;
148              
149             foreach my $env_skip ( qw(SKIP_POD_LINKCHECK) ) {
150             plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip};
151             }
152              
153             eval "use Test::Pod::LinkCheck";
154             if ( $@ ) {
155             plan skip_all => 'Test::Pod::LinkCheck required for testing POD';
156             } else {
157             my $linktest = Test::Pod::LinkCheck->new;
158             $linktest->cpan_backend('CPAN');
159             $linktest->all_pod_ok;
160             }