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.037;
2             # ABSTRACT: common extra tests for META.yml
3              
4 2     2   2356 use Moose;
  2         35  
  2         21  
5             extends 'Dist::Zilla::Plugin::InlineFiles';
6             with 'Dist::Zilla::Role::PrereqSource';
7              
8 2     2   15495 use Dist::Zilla::Pragmas;
  2         7  
  2         20  
9              
10 2     2   16 use namespace::autoclean;
  2         5  
  2         23  
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 2 my ($self) = @_;
37              
38 1         31 $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.037
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
75             released in the last two to three years. (That is, if the most recently
76             released version is v5.40, then this module should work on both v5.40 and
77             v5.38.)
78              
79             Although it may work on older versions of perl, no guarantee is made that the
80             minimum required version will not be increased. The version may be increased
81             for any reason, and there is no promise that patches will be accepted to
82             lower the minimum required perl.
83              
84             =head1 SEE ALSO
85              
86             Core Dist::Zilla plugins:
87             L<MetaResources|Dist::Zilla::Plugin::MetaResources>,
88             L<MetaNoIndex|Dist::Zilla::Plugin::MetaNoIndex>,
89             L<MetaYAML|Dist::Zilla::Plugin::MetaYAML>,
90             L<MetaJSON|Dist::Zilla::Plugin::MetaJSON>,
91             L<MetaConfig|Dist::Zilla::Plugin::MetaConfig>.
92              
93             =head1 AUTHOR
94              
95             Ricardo SIGNES 😏 <cpan@semiotic.systems>
96              
97             =head1 COPYRIGHT AND LICENSE
98              
99             This software is copyright (c) 2026 by Ricardo SIGNES.
100              
101             This is free software; you can redistribute it and/or modify it under
102             the same terms as the Perl 5 programming language system itself.
103              
104             =cut
105              
106             __DATA__
107             ___[ xt/author/distmeta.t ]___
108             #!perl
109             # This file was automatically generated by Dist::Zilla::Plugin::MetaTests
110             use strict;
111             use warnings;
112             use Test::CPAN::Meta;
113              
114             meta_yaml_ok();