| 1 | package Pod::Knit::Plugin::Legal; | ||||||||||
| 2 | 3 | our $AUTHORITY = 'cpan:YANICK'; | |||||||||
| 3 | 3 | $Pod::Knit::Plugin::Legal::VERSION = '0.0.1'; | |||||||||
| 4 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 3 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 3 | extends 'Pod::Knit::Plugin'; | |||||||||
| 10 | 3 | with 'Pod::Knit::DOM::WebQuery'; | |||||||||
| 11 | |||||||||||
| 12 | 3 | ▶ | use experimental 'signatures'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | has license => ( | ||||||||||
| 15 | is => 'ro', | ||||||||||
| 16 | lazy => 1, | ||||||||||
| 17 | 1 | ▶ | default => sub ($self) { $self->stash->{license} }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 3 | ); | |||||||||
| 19 | |||||||||||
| 20 | 2 | ▶ | sub munge ($self,$doc) { | ||||||||
|
Subroutine
munge: called CC=2 SCAR=6.9
| |||||||||||
| 21 | |||||||||||
| 22 | 2 | ▶ | my $license = $self->license or return; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | |||||||||||
| 24 | 1 | $doc->find_or_create_section( 'COPYRIGHT AND LICENSE', 1, undef, | |||||||||
| 25 | 'para' => $license->notice, | ||||||||||
| 26 | 'para' => [ | ||||||||||
| 27 | '"' => 'Full text of the license can be found in the ', | ||||||||||
| 28 | 'f' => 'LICENSE', | ||||||||||
| 29 | '"' => ' file included in this distribution.' | ||||||||||
| 30 | ] | ||||||||||
| 31 | ); | ||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 3 | 1; | |||||||||
| 35 | |||||||||||
| 36 | __END__ | ||||||||||