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