File Coverage

blib/lib/Dist/Zilla/Plugin/MetaTests.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 15 16 93.7


line stmt bran cond sub pod time code
1             package Dist::Zilla::Plugin::MetaTests 6.029;
2             # ABSTRACT: common extra tests for META.yml
3              
4 2     2   2006 use Moose;
  2         6  
  2         20  
5             extends 'Dist::Zilla::Plugin::InlineFiles';
6             with 'Dist::Zilla::Role::PrereqSource';
7              
8 2     2   14735 use Dist::Zilla::Pragmas;
  2         7  
  2         17  
9              
10 2     2   17 use namespace::autoclean;
  2         5  
  2         17  
11              
12             #pod =head1 DESCRIPTION
13             #pod
14             #pod This is an extension of L<Dist::Zilla::Plugin::InlineFiles>, providing the
15             #pod following files:
16             #pod
17             #pod xt/author/meta-yaml.t - a standard Test::CPAN::Meta test
18             #pod
19             #pod L<Test::CPAN::Meta> will be added as a C<develop requires> dependency (which
20             #pod can be installed via C<< dzil listdeps --author | cpanm >>).
21             #pod
22             #pod =head1 SEE ALSO
23             #pod
24             #pod Core Dist::Zilla plugins:
25             #pod L<MetaResources|Dist::Zilla::Plugin::MetaResources>,
26             #pod L<MetaNoIndex|Dist::Zilla::Plugin::MetaNoIndex>,
27             #pod L<MetaYAML|Dist::Zilla::Plugin::MetaYAML>,
28             #pod L<MetaJSON|Dist::Zilla::Plugin::MetaJSON>,
29             #pod L<MetaConfig|Dist::Zilla::Plugin::MetaConfig>.
30             #pod
31             #pod =cut
32              
33             # Register the author test prereq as a "develop requires"
34             # so it will be listed in "dzil listdeps --author"
35             sub register_prereqs {
36 1     1 0 3 my ($self) = @_;
37              
38 1         33 $self->zilla->register_prereqs(
39             {
40             phase => 'develop', type => 'requires',
41             },
42             'Test::CPAN::Meta' => 0,
43             );
44             }
45              
46             __PACKAGE__->meta->make_immutable;
47             1;
48              
49             =pod
50              
51             =encoding UTF-8
52              
53             =head1 NAME
54              
55             Dist::Zilla::Plugin::MetaTests - common extra tests for META.yml
56              
57             =head1 VERSION
58              
59             version 6.029
60              
61             =head1 DESCRIPTION
62              
63             This is an extension of L<Dist::Zilla::Plugin::InlineFiles>, providing the
64             following files:
65              
66             xt/author/meta-yaml.t - a standard Test::CPAN::Meta test
67              
68             L<Test::CPAN::Meta> will be added as a C<develop requires> dependency (which
69             can be installed via C<< dzil listdeps --author | cpanm >>).
70              
71             =head1 PERL VERSION
72              
73             This module should work on any version of perl still receiving updates from
74             the Perl 5 Porters. This means it should work on any version of perl released
75             in the last two to three years. (That is, if the most recently released
76             version is v5.40, then this module should work on both v5.40 and v5.38.)
77              
78             Although it may work on older versions of perl, no guarantee is made that the
79             minimum required version will not be increased. The version may be increased
80             for any reason, and there is no promise that patches will be accepted to lower
81             the minimum required perl.
82              
83             =head1 SEE ALSO
84              
85             Core Dist::Zilla plugins:
86             L<MetaResources|Dist::Zilla::Plugin::MetaResources>,
87             L<MetaNoIndex|Dist::Zilla::Plugin::MetaNoIndex>,
88             L<MetaYAML|Dist::Zilla::Plugin::MetaYAML>,
89             L<MetaJSON|Dist::Zilla::Plugin::MetaJSON>,
90             L<MetaConfig|Dist::Zilla::Plugin::MetaConfig>.
91              
92             =head1 AUTHOR
93              
94             Ricardo SIGNES 😏 <cpan@semiotic.systems>
95              
96             =head1 COPYRIGHT AND LICENSE
97              
98             This software is copyright (c) 2022 by Ricardo SIGNES.
99              
100             This is free software; you can redistribute it and/or modify it under
101             the same terms as the Perl 5 programming language system itself.
102              
103             =cut
104              
105             __DATA__
106             ___[ xt/author/distmeta.t ]___
107             #!perl
108             # This file was automatically generated by Dist::Zilla::Plugin::MetaTests.
109             use strict;
110             use warnings;
111             use Test::CPAN::Meta;
112              
113             meta_yaml_ok();