summaryrefslogtreecommitdiff
path: root/ext/Pod-Html
diff options
context:
space:
mode:
authorMarc Green <marcgreen@cpan.org>2011-06-20 10:31:44 -0400
committerMarc Green <marcgreen@cpan.org>2011-10-31 13:26:40 -0400
commit89fdb0d8d5f7181392c5036cda59f5b3cb7f6c03 (patch)
tree578e9e4b09e3b827b8e81df732311e76b360ed6a /ext/Pod-Html
parentffefbf5fd47ba511cd2ed362f4a1c7ffab96d07b (diff)
downloadperl-89fdb0d8d5f7181392c5036cda59f5b3cb7f6c03.tar.gz
Use catdir (not catfile) to avoid a leading '//'
Diffstat (limited to 'ext/Pod-Html')
-rw-r--r--ext/Pod-Html/lib/Pod/Html.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm
index 21d00c1f29..11a9ed71d0 100644
--- a/ext/Pod-Html/lib/Pod/Html.pm
+++ b/ext/Pod-Html/lib/Pod/Html.pm
@@ -556,7 +556,8 @@ sub resolve_pod_page_link {
$path = $self->pages->{$to};
}
- my $url = File::Spec->catfile($self->htmlroot, $path);
+ # catdir takes care of a leading '//', so I use it here
+ my $url = File::Spec->catdir($self->htmlroot, $path);
if ($self->htmlfileurl ne '') {
# then $self->htmlroot eq '' (by definition of htmlfileurl) so
# $self->htmldir needs to be prepended to link to get the absolute path