| 1 | package PPI::Transform::Doxygen::POD; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use 5.010001; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use parent qw(Pod::POM::View::HTML); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 2 | our $VERSION = '0.33'; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 2 | our $PREFIX = ''; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | sub view_pod { | ||||||||||||||||||||||||||||
| 13 | 20 | ▶ | my ($self, $pod) = @_; | ||||||||||||||||||||||||||
|
Subroutine
view_pod: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 14 | 20 | return $pod->content->present($self); | |||||||||||||||||||||||||||
| 15 | } | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | sub view_head1 { | ||||||||||||||||||||||||||||
| 18 | 3 | ▶ | my ($self, $head1) = @_; | ||||||||||||||||||||||||||
|
Subroutine
view_head1: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 19 | 3 | my $title = $head1->title->present($self); | |||||||||||||||||||||||||||
| 20 | 3 | (my $name = $title) =~ s/\s/_/g; | |||||||||||||||||||||||||||
| 21 | 3 | return "\n\@section ${PREFIX}_$name $title\n" . $head1->content->present($self); | |||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | sub view_head2 { | ||||||||||||||||||||||||||||
| 25 | 9 | ▶ | my ($self, $head2) = @_; | ||||||||||||||||||||||||||
|
Subroutine
view_head2: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 26 | 9 | my $title = $head2->title->present($self); | |||||||||||||||||||||||||||
| 27 | 9 | (my $name = $title) =~ s/\s/_/g; | |||||||||||||||||||||||||||
| 28 | 9 | ▶ | my $sect = $title =~ /[\w:]+\s*\(.*\)/ | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 29 | ? "\n" | ||||||||||||||||||||||||||||
| 30 | : "\n\@subsection $name $title\n"; | ||||||||||||||||||||||||||||
| 31 | 9 | return $sect . $head2->content->present($self); | |||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | sub view_seq_code { | ||||||||||||||||||||||||||||
| 35 | 1 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||||||||||
|
Subroutine
view_seq_code: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 36 | 1 | return qq(<span style="background-color:#eee;padding-left:0.5em;padding-right:0.5em;font-family:Monospace;font-weight: bold;">$text</span>); | |||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | sub view_verbatim { | ||||||||||||||||||||||||||||
| 40 | 1 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||||||||||
|
Subroutine
view_verbatim: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 41 | 1 | _unescape($text); | |||||||||||||||||||||||||||
| 42 | 1 | return "\n\@code\n$text\n\@endcode\n"; | |||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | sub view_seq_link { | ||||||||||||||||||||||||||||
| 46 | 0 | ▶ | my ($self, $link) = @_; | ||||||||||||||||||||||||||
|
Subroutine
view_seq_link: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 47 | 0 | my($title, $pre) = split(/\|/, $link); | |||||||||||||||||||||||||||
| 48 | 0 | ▶ | my $url = $pre && $pre =~ m(^\w+://) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$pre and $pre =~ m[^\w+://]
MC/DC0%0/2
$pre and $pre =~ m[^\w+://]
$pre
$pre =~ m[^\w+://]
Truth table0%0/3
A and B
A= $preB= $pre =~ m[^\w+://]
| |||||||||||||||||||||||||||||
| 49 | ? qq(<a href="$pre">$title</a>) | ||||||||||||||||||||||||||||
| 50 | : $self->SUPER::view_seq_link($link); | ||||||||||||||||||||||||||||
| 51 | 0 | return $url; | |||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 2 | my %XML_TO = ( | |||||||||||||||||||||||||||
| 55 | '&' => '&', | ||||||||||||||||||||||||||||
| 56 | '<' => '<', | ||||||||||||||||||||||||||||
| 57 | '>' => '>', | ||||||||||||||||||||||||||||
| 58 | '"' => '"', | ||||||||||||||||||||||||||||
| 59 | '\'' => ''' | ||||||||||||||||||||||||||||
| 60 | ); | ||||||||||||||||||||||||||||
| 61 | 2 | my %XML_FROM = reverse %XML_TO; | |||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | sub _unescape { | ||||||||||||||||||||||||||||
| 64 | 1 | ▶ | $_[0] =~ s!\Q$_!$XML_FROM{$_}!g for keys %XML_FROM; | ||||||||||||||||||||||||||
|
Subroutine
_unescape: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 65 | 1 | $_[0] =~ s!\\(\@|\\|\%|#)!$1!g; | |||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | sub _escape { | ||||||||||||||||||||||||||||
| 69 | 0 | ▶ | $_[0] =~ s!\Q$_!$XML_TO{$_}!g for keys %XML_TO; | ||||||||||||||||||||||||||
|
Subroutine
_escape: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||
| 73 | 2 | 1; | |||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | __END__ | ||||||||||||||||||||||||||||