| 1 | package Pod::Weaver::Section::Homepage::DefaultCPAN; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | our $DATE = '2015-04-02'; # DATE | |||||||||||
| 4 | 1 | our $VERSION = '0.05'; # VERSION | |||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use 5.010001; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | #use Text::Wrap (); | ||||||||||||
| 9 | 1 | with 'Pod::Weaver::Role::AddTextToSection'; | |||||||||||
| 10 | 1 | with 'Pod::Weaver::Role::Section'; | |||||||||||
| 11 | |||||||||||||
| 12 | 1 | has text => ( | |||||||||||
| 13 | is => 'rw', | ||||||||||||
| 14 | isa => 'Str', | ||||||||||||
| 15 | default => q{Please visit the project's homepage at L<%s>.}, | ||||||||||||
| 16 | ); | ||||||||||||
| 17 | |||||||||||||
| 18 | 0 | ▶ | sub weave_section { | ||||||||||
|
Subroutine
weave_section: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||
| 19 | 0 | my ($self, $document, $input) = @_; | |||||||||||
| 20 | |||||||||||||
| 21 | 0 | my $name = $input->{zilla}->name; | |||||||||||
| 22 | my $homepage = $input->{distmeta}{resources}{homepage} // | ||||||||||||
| 23 | 0 | ▶ | "https://metacpan.org/release/$name"; | ||||||||||
|
Condition0%0/2
$input->{"distmeta"}{"resources"}{"homepage"} // "https://metacpan.org/release/$name"
MC/DC0%0/1
$input->{"distmeta"}{"resources"}{"homepage"} // "https://metacpan.org/release/$name"
$input->{"distmeta"}{"resources"}{"homepage"}
Truth table0%0/2
A
A= $input->{"distmeta"}{"resources"}{"homepage"}
| |||||||||||||
| 24 | |||||||||||||
| 25 | 0 | my $text = sprintf($self->text, $homepage) . "\n\n"; | |||||||||||
| 26 | |||||||||||||
| 27 | #$text = Text::Wrap::wrap(q{}, q{}, $text); | ||||||||||||
| 28 | |||||||||||||
| 29 | 0 | $self->add_text_to_section($document, $text, 'HOMEPAGE'); | |||||||||||
| 30 | } | ||||||||||||
| 31 | |||||||||||||
| 32 | 1 | ▶ | no Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 33 | 1 | 1; | |||||||||||
| 34 | # ABSTRACT: Add a HOMEPAGE section (homepage defaults to MetaCPAN release page) | ||||||||||||
| 35 | |||||||||||||
| 36 | __END__ | ||||||||||||