| 1 | package Dist::Zilla::Role::LicenseProvider 6.040; | ||
| 2 | # ABSTRACT: something that provides a license for the dist | ||
| 3 | |||
| 4 | 2 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | with 'Dist::Zilla::Role::Plugin'; | |
| 6 | |||
| 7 | 2 | ▶ | use Dist::Zilla::Pragmas; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | #pod =head1 DESCRIPTION | ||
| 10 | #pod | ||
| 11 | #pod Plugins implementing this role must provide a C<provide_license> method that | ||
| 12 | #pod will be called when setting the dist's license. | ||
| 13 | #pod | ||
| 14 | #pod If a LicenseProvider offers a license but one has already been set, an | ||
| 15 | #pod exception will be raised. If C<provides_license> returns undef, it will be | ||
| 16 | #pod ignored. | ||
| 17 | #pod | ||
| 18 | #pod =head1 REQUIRED METHODS | ||
| 19 | #pod | ||
| 20 | #pod =head2 C<< provide_license({ copyright_holder => $holder, copyright_year => $year }) >> | ||
| 21 | #pod | ||
| 22 | #pod Generate license object. Returned object should be an instance of | ||
| 23 | #pod L<Software::License>. | ||
| 24 | #pod | ||
| 25 | #pod Plugins are responsible for injecting C<$copyright_holder> and | ||
| 26 | #pod C<$copyright_year> arguments into the license if these arguments are defined. | ||
| 27 | #pod | ||
| 28 | #pod Note that C<$copyright_year> may not be a single integer. The user might have | ||
| 29 | #pod configured a range like C<2008 - 2012>, and any C<$this_year> token in the | ||
| 30 | #pod configured year has already been replaced with the current year. | ||
| 31 | #pod | ||
| 32 | #pod =cut | ||
| 33 | |||
| 34 | 2 | requires 'provide_license'; | |
| 35 | |||
| 36 | 2 | ▶ | no Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 37 | 2 | 1; | |
| 38 | |||
| 39 | __END__ | ||