| 1 | # Copyrights 2003-2021 by [Mark Overmeer]. | ||||||||||||||||||||||||||||
| 2 | # For other contributors see ChangeLog. | ||||||||||||||||||||||||||||
| 3 | # See the manual pages for details on the licensing terms. | ||||||||||||||||||||||||||||
| 4 | # Pod stripped from pm file by OODoc 2.02. | ||||||||||||||||||||||||||||
| 5 | # This code is part of perl distribution OODoc. It is licensed under the | ||||||||||||||||||||||||||||
| 6 | # same terms as Perl itself: https://spdx.org/licenses/Artistic-2.0.html | ||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | package OODoc::Parser; | ||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use vars '$VERSION'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 1 | $VERSION = '2.02'; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 1 | ▶ | use base 'OODoc::Object'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use Log::Report 'oodoc'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 18 | 1 | ▶ | use List::Util 'first'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | #------------------------------------------- | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | sub init($) | ||||||||||||||||||||||||||||
| 25 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
init: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 26 | 0 | ▶ | $self->SUPER::init($args) or return; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 0 | ▶ | my $skip = delete $args->{skip_links} || []; | ||||||||||||||||||||||||||
|
Condition0%0/2
delete $args->{'skip_links'} || []
MC/DC0%0/1
delete $args->{'skip_links'} || []
delete $args->{'skip_links'}
Truth table0%0/2
A
A= delete $args->{'skip_links'}
| |||||||||||||||||||||||||||||
| 29 | 0 | ▶ | my @skip = map { ref $_ eq 'Regexp' ? $_ : qr/^\Q$_\E(?:\:\:|$)/ } | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 30 | ref $skip eq 'ARRAY' ? @$skip : $skip; | ||||||||||||||||||||||||||||
| 31 | 0 | $self->{skip_links} = \@skip; | |||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 0 | $self; | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | #------------------------------------------- | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | ▶ | sub parse(@) {panic} | ||||||||||||||||||||||||||
|
Subroutine
parse: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | #------------------------------------------- | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | sub skipManualLink($) | ||||||||||||||||||||||||||||
| 45 | 0 | ▶ | { my ($self, $package) = @_; | ||||||||||||||||||||||||||
|
Subroutine
skipManualLink: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||
| 46 | 0 | ▶ | (first { $package =~ $_ } @{$self->{skip_links}}) ? 1 : 0; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | sub cleanup($$$) | ||||||||||||||||||||||||||||
| 51 | 0 | ▶ | { my ($self, $formatter, $manual, $string) = @_; | ||||||||||||||||||||||||||
|
Subroutine
cleanup: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | 0 | ▶ | return $self->cleanupPod($formatter, $manual, $string) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 54 | if $formatter->isa('OODoc::Format::Pod'); | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | 0 | ▶ | return $self->cleanupHtml($formatter, $manual, $string) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$formatter->isa("OODoc::Format::Html") or $formatter->isa("OODoc::Format::Html2")
MC/DC0%0/2
$formatter->isa("OODoc::Format::Html") or $formatter->isa("OODoc::Format::Html2")
$formatter->isa("OODoc::Format::Html")
$formatter->isa("OODoc::Format::Html2")
Truth table0%0/3
A or B
A= $formatter->isa("OODoc::Format::Html")B= $formatter->isa("OODoc::Format::Html2")
| |||||||||||||||||||||||||||||
| 57 | if $formatter->isa('OODoc::Format::Html') | ||||||||||||||||||||||||||||
| 58 | || $formatter->isa('OODoc::Format::Html2'); | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | 0 | error __x"the formatter type {type} is not known for cleanup" | |||||||||||||||||||||||||||
| 61 | , type => ref $formatter; | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | 0 | $string; | |||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | 1 | 1; | |||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||