Skip Menu |
Report information
Id: 110056
Status: pending release
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: nicholas <nick [at] ccl4.org>
Cc:
AdminCc:

Operating System: All
PatchStatus: (no value)
Severity: low
Type:
Perl Version: 5.15.7
Fixed In: (no value)



Subject: installhtml uses absolute paths in links
Date: Tue, 7 Feb 2012 13:37:01 +0000
To: perlbug [...] perl.org
From: Nicholas Clark <nick [...] ccl4.org>
Download (untitled) / with headers
text/plain 622b
The HTML tree generated by installhtml (using Pod::Html) uses absolute paths in links to other parts of the tree it generates. For example, in perlsyn.html: <p>See <a href="/home/nick/Sandpit/snap-v5.15.7-287-gedda670/lib/perl5/5.15.7/html/home/nick/Perl/perl/pod/perlfunc.html#do">&quot;do&quot; in perlfunc</a>. I feel that the generated HTML should be using relative paths when linking to files within the same tree (built at the same time). This would 1) make the HTML smaller 2) make it possible to relocate the tree without breaking the links This isn't a regression from perl 5.14.0 or 5.12.0 Nicholas Clark
CC: bugs-bitbucket [...] rt.perl.org
Subject: Re: [perl #110056] installhtml uses absolute paths in links
Date: Sun, 19 Feb 2012 02:34:04 -0500
To: perl5-porters [...] perl.org
From: Marc Green <ponguile [...] gmail.com>
Download (untitled) / with headers
text/plain 2.1k


On Tue, Feb 7, 2012 at 8:37 AM, Nicholas Clark <perlbug-followup@perl.org> wrote:
Show quoted text
# New Ticket Created by  Nicholas Clark
# Please include the string:  [perl #110056]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=110056 >


The HTML tree generated by installhtml (using Pod::Html) uses absolute paths
in links to other parts of the tree it generates.

For example, in perlsyn.html:

<p>See <a href="/home/nick/Sandpit/snap-v5.15.7-287-gedda670/lib/perl5/5.15.7/html/home/nick/Perl/perl/pod/perlfunc.html#do">&quot;do&quot; in perlfunc</a>.


I believe the best way to accomplish this would be to have installhtml call pod2html and pass only --htmldir, not --htmlroot (or, equivalently, pass --htmlroot=/, its default value). Pod::Html will cross reference using relative links if it is called in this manner. In fact, if one manually calls installhtml with --htmldir set and without setting --htmlroot, this should happen (theoretically, i.e.; I have not tested it).

If one uses `make install.html` (see below) to call installhtml, then --htmlroot will be set, and thus absolute links will be used.

# XXX Experimental. Hardwired values, but useful for testing.
# Eventually Configure could ask for some of these values.
install.html: all installhtml
    -@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd ..
    $(RUN_PERL) installhtml   \
      --podroot=. --podpath=. --recurse  \
      --htmldir=$(privlib)/html   \
      --htmlroot=$(privlib)/html  \
---------^
This should not be here if relative links are desired.

      --splithead=pod/perlipc     \
      --splititem=pod/perlfunc    \
      --ignore=Porting/Maintainers.pm,Porting/pumpkin.pod,Porting/repository.pod \
      --verbose

I removed the indicated line and relative links were generated in the resulting html tree.
 
Show quoted text

I feel that the generated HTML should be using relative paths when linking to
files within the same tree (built at the same time). This would

1) make the HTML smaller
2) make it possible to relocate the tree without breaking the links

This isn't a regression from perl 5.14.0 or 5.12.0

Nicholas Clark


From: Zefram <zefram [...] fysh.org>
Subject: Re: [perl #110056] installhtml uses absolute paths in links
Date: Thu, 14 Dec 2017 02:48:09 +0000
To: perl5-porters [...] perl.org
Fixed in commit 0bd1c35ee47dab181543ba366fe021122c591f65. -zefram


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org