File Coverage

blib/lib/Dist/Zilla/Role/VersionProvider.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Dist::Zilla::Role::VersionProvider 6.037;
2             # ABSTRACT: something that provides a version number for the dist
3              
4 2     2   1877 use Moose::Role;
  2         5  
  2         16  
5             with 'Dist::Zilla::Role::Plugin';
6              
7 2     2   11170 use Dist::Zilla::Pragmas;
  2         5  
  2         15  
8              
9 2     2   13 use namespace::autoclean;
  2         7  
  2         15  
10              
11             #pod =head1 DESCRIPTION
12             #pod
13             #pod Plugins implementing this role must provide a C<provide_version> method that
14             #pod will be called when setting the dist's version.
15             #pod
16             #pod If a VersionProvider offers a version but one has already been set, an
17             #pod exception will be raised. If C<provides_version> returns undef, it will be
18             #pod ignored.
19             #pod
20             #pod =cut
21              
22             requires 'provide_version';
23              
24             1;
25              
26             #pod =head1 SEE ALSO
27             #pod
28             #pod Core Dist::Zilla plugins implementing this role:
29             #pod L<AutoVersion|Dist::Zilla::Plugin::AutoVersion>.
30             #pod
31             #pod =cut
32              
33             __END__
34              
35             =pod
36              
37             =encoding UTF-8
38              
39             =head1 NAME
40              
41             Dist::Zilla::Role::VersionProvider - something that provides a version number for the dist
42              
43             =head1 VERSION
44              
45             version 6.037
46              
47             =head1 DESCRIPTION
48              
49             Plugins implementing this role must provide a C<provide_version> method that
50             will be called when setting the dist's version.
51              
52             If a VersionProvider offers a version but one has already been set, an
53             exception will be raised. If C<provides_version> returns undef, it will be
54             ignored.
55              
56             =head1 PERL VERSION
57              
58             This module should work on any version of perl still receiving updates from
59             the Perl 5 Porters. This means it should work on any version of perl
60             released in the last two to three years. (That is, if the most recently
61             released version is v5.40, then this module should work on both v5.40 and
62             v5.38.)
63              
64             Although it may work on older versions of perl, no guarantee is made that the
65             minimum required version will not be increased. The version may be increased
66             for any reason, and there is no promise that patches will be accepted to
67             lower the minimum required perl.
68              
69             =head1 SEE ALSO
70              
71             Core Dist::Zilla plugins implementing this role:
72             L<AutoVersion|Dist::Zilla::Plugin::AutoVersion>.
73              
74             =head1 AUTHOR
75              
76             Ricardo SIGNES 😏 <cpan@semiotic.systems>
77              
78             =head1 COPYRIGHT AND LICENSE
79              
80             This software is copyright (c) 2026 by Ricardo SIGNES.
81              
82             This is free software; you can redistribute it and/or modify it under
83             the same terms as the Perl 5 programming language system itself.
84              
85             =cut