line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::Tree::HTML::LinkMap; |
2
|
13
|
|
|
13
|
|
8836051
|
use 5.006; |
|
13
|
|
|
|
|
55
|
|
3
|
13
|
|
|
13
|
|
76
|
use strict; |
|
13
|
|
|
|
|
33
|
|
|
13
|
|
|
|
|
287
|
|
4
|
13
|
|
|
13
|
|
70
|
use warnings; |
|
13
|
|
|
|
|
28
|
|
|
13
|
|
|
|
|
2914
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.31'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
60
|
|
|
60
|
0
|
153
|
my $class = shift; |
10
|
60
|
|
|
|
|
420
|
bless {}, $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub url { |
14
|
156
|
|
|
156
|
0
|
285
|
my ( $link_map, $html, $target ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
156
|
|
|
|
|
265
|
my $depth = $html->{options}{depth}; |
17
|
156
|
|
|
|
|
321
|
my $base = join '/', ('..') x $depth; |
18
|
|
|
|
|
|
|
|
19
|
156
|
|
|
|
|
343
|
my $page = $target->get_page; |
20
|
156
|
|
|
|
|
304
|
$page =~ s(::)(/)g; |
21
|
156
|
100
|
|
|
|
366
|
$page .= '.html' if $page; |
22
|
|
|
|
|
|
|
|
23
|
156
|
|
|
|
|
340
|
my $section = $target->get_section; |
24
|
156
|
|
|
|
|
355
|
my $fragment = $html->escape_2396($section); |
25
|
|
|
|
|
|
|
|
26
|
156
|
|
|
|
|
375
|
my $url = $html->assemble_url( $base, $page, $fragment ); |
27
|
156
|
|
|
|
|
380
|
$url; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |