| 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
| |||||||||||
| 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; | |||||||||