lib/Pod/Tree/HTML/LinkMap.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 93.5% 29 / 31 CC 2 SCAR 2.9
CC
2
Cov
100%
url
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« lib/Pod/Tree/PerlPod.pm ↑ Summary lib/Pod/Tree/StrStream.pm »
1 package Pod::Tree::HTML::LinkMap;
2 30 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 30 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 30 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 30 our $VERSION = '1.31';
7  
8 124 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
9 124 my $class = shift;
10 124 bless {}, $class;
11 }
12  
13 431 ▶sub url {
Subroutine url: called CC=2 SCAR=6.9
Pod undocumented
14 431 my ( $link_map, $html, $target ) = @_;
15  
16 431 my $depth = $html->{options}{depth};
17 431 my $base = join '/', ('..') x $depth;
18  
19 431 my $page = $target->get_page;
20 431 $page =~ s(::)(/)g;
21 431 ▶ $page .= '.html' if $page;
Branch: 1 branch
BranchTrueFalseTotal
if $page 294 137 431
22  
23 431 my $section = $target->get_section;
24 431 my $fragment = $html->escape_2396($section);
25  
26 431 my $url = $html->assemble_url( $base, $page, $fragment );
27 431 $url;
28 }
29  
30 30 1;
« lib/Pod/Tree/PerlPod.pm ↑ Summary lib/Pod/Tree/StrStream.pm »