Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installhtml uses absolute paths in links #11941

Closed
p5pRT opened this issue Feb 7, 2012 · 7 comments
Closed

installhtml uses absolute paths in links #11941

p5pRT opened this issue Feb 7, 2012 · 7 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Feb 7, 2012

Migrated from rt.perl.org#110056 (status was 'resolved')

Searchable as RT110056$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Feb 7, 2012

From @nwc10

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">"do" 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

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Feb 19, 2012

From ponguile@gmail.com

On Tue, Feb 7, 2012 at 8​:37 AM, Nicholas Clark <perlbug-followup@​perl.org>wrote​:

# 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-archive.perl.org/perl5/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">"do"
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.

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

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Feb 19, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 14, 2017

From zefram@fysh.org

Fixed in commit 0bd1c35.

-zefram

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 14, 2017

@cpansprout - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Jun 23, 2018

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release yesterday of Perl 5.28.0, this and 185 other issues have been
resolved.

Perl 5.28.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.28.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT p5pRT closed this Jun 23, 2018
@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Jun 23, 2018

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.