| 1 | package Pod::Weaver::Section::Bugs::DefaultRT; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | our $DATE = '2016-10-07'; # DATE | |||||||||||||||||||||||||||
| 4 | 1 | our $VERSION = '0.06'; # 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::Section'; | |||||||||||||||||||||||||||
| 10 | 1 | with 'Pod::Weaver::Role::AddTextToSection'; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 0 | ▶ | sub weave_section { | ||||||||||||||||||||||||||
|
Subroutine
weave_section: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 13 | 0 | my ($self, $document, $input) = @_; | |||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 0 | my ($web,$mailto); | |||||||||||||||||||||||||||
| 16 | 0 | for my $meta_key (qw(distmeta meta)){ | |||||||||||||||||||||||||||
| 17 | 0 | ▶ | if ($input->{$meta_key}{resources}{bugtracker}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 18 | 0 | my $bugtracker = $input->{$meta_key}{resources}{bugtracker}; | |||||||||||||||||||||||||||
| 19 | 0 | ($web,$mailto) = @{$bugtracker}{qw/web mailto/}; | |||||||||||||||||||||||||||
| 20 | 0 | last; | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 0 | ▶ | if (!$web && !$mailto) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$web or $mailto
MC/DC0%0/2
$web or $mailto
$web
$mailto
Truth table0%0/3
A or B
A= $webB= $mailto
| |||||||||||||||||||||||||||||
| 25 | 0 | my $name = $input->{zilla}->name; | |||||||||||||||||||||||||||
| 26 | 0 | $web = "http://rt.cpan.org/Public/Dist/Display.html?Name=$name"; | |||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | 0 | my $text = "Please report any bugs or feature requests "; | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 0 | ▶ | if (defined $web) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 0 | $text .= "on the bugtracker website L<$web>"; | |||||||||||||||||||||||||||
| 32 | 0 | ▶ | $text .= defined $mailto ? " or " : "\n"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 0 | ▶ | if (defined $mailto) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 36 | 0 | $text .= "by email to L<mailto:$mailto>\.\n"; | |||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | # disabled temporarily, Text::Wrap wraps "L<blah" + ">". a better wrapping | ||||||||||||||||||||||||||||
| 40 | # module is needed. | ||||||||||||||||||||||||||||
| 41 | # $text = Text::Wrap::wrap(q{}, q{}, $text); | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 0 | $text .= <<'HERE'; | |||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | When submitting a bug or request, please include a test-file or a | ||||||||||||||||||||||||||||
| 46 | patch to an existing test-file that illustrates the bug or desired | ||||||||||||||||||||||||||||
| 47 | feature. | ||||||||||||||||||||||||||||
| 48 | HERE | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | 0 | $text .= "\n\n"; | |||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | 0 | $self->add_text_to_section($document, $text, 'BUGS', | |||||||||||||||||||||||||||
| 53 | {ignore=>1}); | ||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | 1 | ▶ | no Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 57 | 1 | 1; | |||||||||||||||||||||||||||
| 58 | # ABSTRACT: Add a BUGS section to refer to bugtracker (or RT as default) | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | __END__ | ||||||||||||||||||||||||||||